4

I know how to run JavaScript in the top level document using Run some Javascript in Flutter Webview, but I am not sure how I would write JavaScript to interact with iframes within the document.

Can somebody explain whether it's possible, and, if so, can you attach an example?

yoyobigmanyo
  • 194
  • 8
  • Is this helpful to you? [Control iframe content with javascript/html](https://stackoverflow.com/a/19498836/10999353) – Spike L Feb 08 '21 at 09:54
  • That works, but only on iframes from the same origin. I want to also interact with iframes from different origins. – yoyobigmanyo Feb 08 '21 at 15:30
  • You can only achieve that due to the cross-domain policy. https://stackoverflow.com/a/9393545/10999353 – Spike L Feb 09 '21 at 01:51

1 Answers1

0

*You can only achieve that if you own both sites due to the cross-domain policy. https://stackoverflow.com/a/9393545/10999353

Spike L
  • 404
  • 2
  • 10