Skip to content

Commit

Permalink
Add new XMLSerializer().serializeToString functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
5h1rU authored and Marcos Cáceres committed Jul 23, 2019
1 parent a643384 commit 27aae91
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions domparsing/XMLSerializer-serializeToString.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ <h1>domparsing_XMLSerializer_serializeToString</h1>
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');
Expand Down

0 comments on commit 27aae91

Please sign in to comment.