24 lines
853 B
HTML
24 lines
853 B
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>background on non-HTML body should not fill the viewport</title>
|
|
<style>
|
|
html { background-color:transparent; background-image:none; }
|
|
body { background-image:url(resources/red.png); }
|
|
p { background-image:url(resources/lime.png); margin:0; }
|
|
</style>
|
|
<script>
|
|
window.onload = function() {
|
|
var oldElm = document.getElementsByTagName("body")[0];
|
|
var newElm = document.createElementNS("urn:foo:bogus", "body");
|
|
while (oldElm.firstChild)
|
|
newElm.appendChild(oldElm.firstChild);
|
|
document.documentElement.replaceChild(newElm, oldElm);
|
|
document.getElementsByTagName("p")[0].firstChild.data = "This line should be green and there should be no red.";
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<p>FAIL (script didn't run)</p>
|
|
</body>
|
|
</html> |