admin管理员组文章数量:1025754
Ever since I have installed an SSL certificate, I have an issue with running a js targeting some information ing from an iframe.
I keep getting:
Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "https://www. *** .ro" from accessing a cross-origin frame.
While searching the internet I found out this is a security issue that won't allow you to load files from another domain or subdomain but the thing is, I am not loading from a subdomain or a different domain. I am loading directly from the same domain/iframe.php .
This happened right after adding an SSL certificate, before that, the exact same script worked without issues.
Ever since I have installed an SSL certificate, I have an issue with running a js targeting some information ing from an iframe.
I keep getting:
Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "https://www. *** .ro" from accessing a cross-origin frame.
While searching the internet I found out this is a security issue that won't allow you to load files from another domain or subdomain but the thing is, I am not loading from a subdomain or a different domain. I am loading directly from the same domain/iframe.php .
This happened right after adding an SSL certificate, before that, the exact same script worked without issues.
Share Improve this question asked Feb 18, 2017 at 16:50 AlinAlin 1,2285 gold badges22 silver badges48 bronze badges 1- Show us the code? – Raymond Nijland Commented Feb 18, 2017 at 16:56
2 Answers
Reset to default 1Try using object and embed to simulate a iframe maybe this works
<object data="https://...." width="600" height="400">
<embed src="https://...." width="600" height="400"> </embed>
</object>
The issue was one of absolute vs relative url for the iframe.
I initially used the website's full url (https://www.***.ro/iframe.php
) which made it look like trying to load a page from another domain even if it wasn't. Once I changed it to simply ../iframe.php
everything is back to normal.
Ever since I have installed an SSL certificate, I have an issue with running a js targeting some information ing from an iframe.
I keep getting:
Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "https://www. *** .ro" from accessing a cross-origin frame.
While searching the internet I found out this is a security issue that won't allow you to load files from another domain or subdomain but the thing is, I am not loading from a subdomain or a different domain. I am loading directly from the same domain/iframe.php .
This happened right after adding an SSL certificate, before that, the exact same script worked without issues.
Ever since I have installed an SSL certificate, I have an issue with running a js targeting some information ing from an iframe.
I keep getting:
Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "https://www. *** .ro" from accessing a cross-origin frame.
While searching the internet I found out this is a security issue that won't allow you to load files from another domain or subdomain but the thing is, I am not loading from a subdomain or a different domain. I am loading directly from the same domain/iframe.php .
This happened right after adding an SSL certificate, before that, the exact same script worked without issues.
Share Improve this question asked Feb 18, 2017 at 16:50 AlinAlin 1,2285 gold badges22 silver badges48 bronze badges 1- Show us the code? – Raymond Nijland Commented Feb 18, 2017 at 16:56
2 Answers
Reset to default 1Try using object and embed to simulate a iframe maybe this works
<object data="https://...." width="600" height="400">
<embed src="https://...." width="600" height="400"> </embed>
</object>
The issue was one of absolute vs relative url for the iframe.
I initially used the website's full url (https://www.***.ro/iframe.php
) which made it look like trying to load a page from another domain even if it wasn't. Once I changed it to simply ../iframe.php
everything is back to normal.
本文标签: javascriptUncaught DOMException Failed to read the 39contentDocument39Stack Overflow
版权声明:本文标题:javascript - Uncaught DOMException: Failed to read the 'contentDocument' - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745637269a2160525.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论