Add contentDocument support for HTMLIFrameElement. Fixes #3808.

This commit is contained in:
Tomasz Kołodziejski 2014-11-10 14:42:59 -08:00
parent 8cb2b922ef
commit af30484f2a
5 changed files with 61 additions and 1 deletions

View file

@ -0,0 +1,27 @@
<html>
<head>
<meta charset="utf8" />
<script src="harness.js"></script>
<title>Iframe contentDocument test.</title>
</head>
<body>
<iframe src="test_iframe_contentDocument_inner.html" id="iframe"></iframe>
<script>
waitForExplicitFinish();
var timeout = 100;
var iframe = document.getElementById('iframe');
function test_contentWindow() {
if (!iframe.contentWindow) {
// Iframe not loaded yet, try again.
// No load event for iframe, insert bug number here.
setTimeout(test_contentWindow, timeout);
return;
}
is(iframe.contentDocument.getElementById('test').textContent, 'value');
finish();
}
test_contentWindow();
</script>
</body>
</html>

View file

@ -0,0 +1 @@
<html><body><div id="test">value</div></body></html>