A.com page has 2 iframes B.com/page1 and B.com/page2 . This is the A.com code:
<html><body> <iframe src="b.com/page1" name="iframe1" id="iframe1"> <iframe src="b.com/page2"> </body></html>
I want to execute the js function on B.com/page1 from B.com/page2 . Both examples below work well when the parent is from the same domain, but not in a cross-domain scope scenario:
parent.window.frames['iframe1'].SomeFunction(args);
or
parent.document.getElementById('iframe1').contentWindow.SomeFunction(args);
Is there any way to do this?
javascript xss cross-domain iframe
Frushko
source share