Open
Bug 1352465
Opened 7 years ago
Updated 2 years ago
Getting permission denied contentwindow.document
Categories
(Firefox :: PDF Viewer, defect, P5)
Tracking
()
UNCONFIRMED
People
(Reporter: ffx, Unassigned)
Details
(Whiteboard: [pdfjs-integration])
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 Build ID: 20170323105023 Steps to reproduce: HTML ------ <!doctype html><html><head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <script src="http://www.example.com/path/y.js"></script> </head><body onload="get_iframe()"> <iframe id="doc_frame" src="http://www.example.com/path/file.pdf"></iframe> </body></html> JAVASCRIPT FILE (y.js) ------------------------- function get_iframe () { console.log(document.getElementById('doc_frame').contentWindow.document); } Actual results: When trying to get the iframe document (from within the .js file), I get this permission error: Error: Permission denied to access property "document" Expected results: I should be able to get the document. All paths are identical (location of html file itself, src in iframe and js file). This only happens in ff.
SecurityError: Permission denied to access property "document" on cross-origin object
Component: Untriaged → DOM: Security
Product: Firefox → Core
Updated•7 years ago
|
Component: DOM: Security → PDF Viewer
Product: Core → Firefox
Updated•7 years ago
|
Priority: -- → P5
Comment 2•5 years ago
|
||
Hi, I experience the same issue, is there any known workaround?
Comment 3•2 years ago
|
||
The error is now Uncaught DOMException: Permission denied to access property "document" on cross-origin object
.
Updated•2 years ago
|
Whiteboard: [pdfjs-integration]
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•