haikuwebkit/LayoutTests/fast/dom/css-innerHTML.html

14 lines
406 B
HTML

<body>
<p>Should say PASS:</p>
<div id="test"></div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var e= document.createElement('style');
e.innerHTML= "<p>foobar</p>"; // yes, that's invalid CSS
document.body.appendChild(e);
// If it were parsed, it would have been just "foobar".
document.getElementById("test").innerHTML = (e.textContent == "<p>foobar</p>") ? "PASS" : "FAIL";
</script>