Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firemonkey: Target an <iframe/> in a shadow DOM? #642

Open
simonwiles opened this issue Jul 2, 2024 · 2 comments
Open

Firemonkey: Target an <iframe/> in a shadow DOM? #642

simonwiles opened this issue Jul 2, 2024 · 2 comments

Comments

@simonwiles
Copy link

I want to execute a script in the context of an iframe (cross-origin) that's loaded in the shadow DOM of a web component. Obviously I can't do this from javascript executed in the context of the parent document because of the cross-origin policy, but also Firemonkey isn't matching the document in the iframe when its inside a shadow DOM (it works with a regular iframe).

Is this something that could be "fixed" in Firemonkey? Are there any workarounds available to me?

Thanks!

@erosman
Copy link
Owner

erosman commented Jul 3, 2024

Is this something that could be "fixed" in Firemonkey?

There are discussions in the WebExtensions Community Group (WECG) currently, regarding the shadow DOM access.

Are there any workarounds available to me?

I have not tested it so I am unaware of the possibilities.

@simonwiles
Copy link
Author

I was hoping/expecting that my script would be injected when the iframe loaded its document (my @match matches the correct URI), as would be the case if the iframe is in the light DOM. I see the problem is more complicated than I realized. Thanks for your response 👍️.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants