WebKit Bugzilla
Attachment 339399 Details for
Bug 185243
: iframe.contentWindow.document not accessible only on WebKit.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
test.html
test.html (text/html), 669 bytes, created by
Emilio Cobos Álvarez (:emilio)
on 2018-05-03 01:50:32 PDT
(
hide
)
Description:
test.html
Filename:
MIME Type:
Creator:
Emilio Cobos Álvarez (:emilio)
Created:
2018-05-03 01:50:32 PDT
Size:
669 bytes
patch
obsolete
><!DOCTYPE html> ><iframe id="frm" style="width: 100px; heigth: 100px"></iframe> ><br> ><script> > var frmDoc = frm.contentWindow.document; > frmDoc.open(); > frmDoc.write('<body>Irrelevant</body>'); > frmDoc.close(); > > document.body.offsetTop; > > if (frm.contentWindow.matchMedia('(max-width: 150px)').matches) > document.write("PASS<br>"); > else > document.write("FAIL - Media didn't match<br>") > > frm.style.width = "200px"; > > // Uncomment to pass: > // frmDoc.documentElement.offsetTop; > > if (frm.contentWindow.matchMedia('(max-width: 150px)').matches) > document.write("FAIL - Media incorrectly matched<br>") > else > document.write("PASS<br>"); ></script>
<!DOCTYPE html> <iframe id="frm" style="width: 100px; heigth: 100px"></iframe> <br> <script> var frmDoc = frm.contentWindow.document; frmDoc.open(); frmDoc.write('<body>Irrelevant</body>'); frmDoc.close(); document.body.offsetTop; if (frm.contentWindow.matchMedia('(max-width: 150px)').matches) document.write("PASS<br>"); else document.write("FAIL - Media didn't match<br>") frm.style.width = "200px"; // Uncomment to pass: // frmDoc.documentElement.offsetTop; if (frm.contentWindow.matchMedia('(max-width: 150px)').matches) document.write("FAIL - Media incorrectly matched<br>") else document.write("PASS<br>"); </script>
View Attachment As Raw
Actions:
View
Attachments on
bug 185243
: 339399