blob: f8e731d3194ecfe471bb448148d8d606169f9564 [file] [log] [blame]
<!DOCTYPE html>
<iframe srcdoc="<html style='display: none'>Foo"></iframe>
<iframe id="doc"></iframe>
<script>
// Test display:none on a non-HTMLElement that is the documentElement.
var doc = document.getElementById('doc').contentDocument;
var root = doc.implementation.createDocument().createElement('not-a-real-element');
doc.replaceChild(root, doc.documentElement);
root.appendChild(document.createElement('style')).textContent = 'not-a-real-element { display: none }';
root.appendChild(document.createElement('p')).textContent = 'Should not be visible';
</script>