lundi 22 juillet 2019

Parent page is loaded from local file system, iframe page is from localhost, How can I access parent page from iframe? [duplicate]

This question already has an answer here:

I have 2 html files, let's call them parent.html and child.html. How can I access parent page info like url, html... from within iframe?

Parent.document violates same-origin-policy.
document.referrer returns empty.
ancestorOrigins returns null, because the parent page is from local file system maybe.
Can insert another iframe from localhost to parent.html but can't insert an iframe from file systen like ""
Can break out iframe but the page after breaking out is just the iframe file itself, no trace of parent.html.
Create another grandchild.html and load it with local file schema from child.html to hope parent and grandchild has same origin but no luck too.




Aucun commentaire:

Enregistrer un commentaire