Firemonkey: Target an `<iframe/`> in a shadow DOM?
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!
Is this something that could be "fixed" in Firemonkey?
There are discussions in the WebExtensions Community Group (WECG) currently, regarding the shadow DOM access.
- Shadow DOM problems for extensions
- Expose openOrClosedShadowRoot for userscripts
- Proposal: getLeafTarget() method
Are there any workarounds available to me?
I have not tested it so I am unaware of the possibilities.
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 👍️.
See also: #547