1

I have created an html file which is loading another html file using the <object> tag. When I run the code, I get the following error (from the html file loaded from the parent file):

Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.

I have added a name to the object tag. All of the files are in the same folder.

I have looked at the cross-origin policy links, and am confused, as I don't seem to be breaching what it says.

Can any one offer any advice about what I might do to fix it?

Thanks

  • It would help some to know if the domain names of the parent window and embedded frame are related. If they are, then consider using https://stackoverflow.com/posts/43337532/edit to edit/update your question to say so. Because if the domains are, e.g., `a.example.com` and `b.example.com`, then you can set [document.domain](https://developer.mozilla.org/en-US/docs/Web/API/Document/domain) on both to get around the cross-origin restriction. – sideshowbarker Apr 11 '17 at 06:17

0 Answers0