36 lines
1.0 KiB
HTML
36 lines
1.0 KiB
HTML
<html>
|
|
<head>
|
|
<script type="text/javascript">
|
|
function runTest()
|
|
{
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
|
|
var ns = 'http://www.w3.org/1999/xhtml';
|
|
var xhtml = document.implementation.createDocument(ns , 'html', null);
|
|
|
|
var p = xhtml.createElementNS(ns, 'p');
|
|
p.textContent = '(0 < 1 && 1 > 0)';
|
|
xhtml.documentElement.appendChild(p);
|
|
|
|
var script = xhtml.createElementNS(ns, 'script');
|
|
script.textContent = 'if (0 < 1 && 1 > 0) { };';
|
|
xhtml.documentElement.appendChild(script);
|
|
|
|
var style = xhtml.createElementNS(ns, 'style');
|
|
style.textContent = '/* < > & */';
|
|
xhtml.documentElement.appendChild(style);
|
|
|
|
var serializer = new XMLSerializer();
|
|
var xmlString = serializer.serializeToString(xhtml);
|
|
|
|
var outputText = document.getElementById("output");
|
|
outputText.textContent = xmlString;
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="runTest()">
|
|
<div id="output"/>
|
|
</body>
|
|
</html>
|