blob: 6e93e2427a6a723dd32fc5f17898e01ba59a4c85 [file] [log] [blame]
<html>
<head>
<script type="text/javascript">
function runTest()
{
if (window.testRunner)
testRunner.dumpAsText();
var doc = document.implementation.createDocument("foo", "x", null);
var parent = doc.firstChild;
var kid = doc.createElementNS(null, "y");
parent.appendChild(kid);
var serializer = new XMLSerializer();
var xmlString = serializer.serializeToString(doc);
var outputText = document.getElementById("output");
outputText.textContent = xmlString;
}
</script>
</head>
<body onload="runTest()">
This tests that XMLSerializer.serializeToString() correctly writes out an empty default namespace declaration if the element is not in any namespace.
<div id="target"/>
<div id="output"/>
</body>
</html>