0

I am trying to use platform XYZ messaging functionality in my web app. The way is see this is having XYZ running in background.html and communication to it via content script of the extension. My problem is - XYZ prevents running in iframe. So I have to remove X-Frame-Options headers, but there is no telling if XYZ successfully rendered. Is there a way to check if it did and what is available in that page - meaning what UI elements I can interact with. I did check out answer on a similar topic: Invisible tabs in chrome extension but that solution seems to be injecting a string into any page without any proof of successful iframe rendering. Appreciate your help regarding this matter.

Alex Oleksiiuk
  • 338
  • 2
  • 9
  • How do you define "successfully rendered" and in which cases it may fail to render? If the problem is timing, you can simply wait for some special element to appear using MutationObserver or a periodic check in the iframe's content script. – wOxxOm Mar 08 '19 at 16:07
  • @wOxxOm it may fail to render in cases when XYZ prevents from rendering in iframe because of the CSP. Doing a check with an interval or timeout returns only empty iframe tag. Would you mind providing example of how you would use MutationObserver in background page? Appreciate your help. – Alex Oleksiiuk Mar 08 '19 at 16:43
  • 1) If CSP is a problem you can strip the CSP header just like you strip X-Frame-Options. 2) I meant MutationObserver in the content script that runs in the iframe. – wOxxOm Mar 08 '19 at 16:44
  • @wOxxOm thank you for your help – Alex Oleksiiuk Mar 08 '19 at 16:51

0 Answers0