rev2022.11.7.43014. . The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "file". Uncaught DOMException: Blocked a frame with origin "http://localhost:8080" from accessing a cross-origin frame while listing the iframes in page. How to find and replace a part of a value in json file, How can I add 2 spaces to a block of code (indentation)? I'm trying to access html document from one of my frames with javascript, but I'm getting a Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame. Uncaught DOMException: Blocked a frame with origin "http://localhost:8080" from accessing a cross-origin frame. Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide. If I try with another site, it loads fine. For the same-origin policy browsers block scripts trying to access a frame with a different origin. I tried to get location of the iframe using following line of code. How can you prove that a certain file was downloaded from a certain website? Thanks for contributing an answer to Stack Overflow! According to the error message they are from different origin. As mentioned above the same-origin policy browsers block scripts trying to access a