Add new XMLSerializer().serializeToString functionality

This commit is contained in:
Felipe Janer 2019-04-01 18:39:48 -05:00
parent 9832feddf3
commit 1ffe8f059a
4 changed files with 10 additions and 2 deletions

View file

@ -31,6 +31,11 @@ test(function() {
assert_equals(serialize(root), '<root><child1>value1</child1></root>');
}, 'check XMLSerializer.serializeToString method could parsing xmldoc to string');
test(function() {
var root = parse('<html><head></head><body><div></div><span></span></body></html>');
assert_equals(serialize(root.ownerDocument), '<html><head/><body><div/><span/></body></html>');
}, 'check XMLSerializer.serializeToString method could parsing document to string');
test(function() {
var root = createXmlDoc().documentElement;
var element = root.ownerDocument.createElementNS('urn:foo', 'another');