Take the namespace of the root node into account, fix other ns oversight #1872

This commit is contained in:
Pierre-Yves Gérardy 2017-06-14 01:59:22 +02:00
parent 38956e119b
commit 1fb64c91e3
2 changed files with 9 additions and 2 deletions

View file

@ -293,4 +293,10 @@ o.spec("render", function() {
o(svg.dom.childNodes[0].namespaceURI).equals("http://www.w3.org/2000/svg")
o(svg.dom.childNodes[1].namespaceURI).equals("http://www.w3.org/2000/svg")
})
o("the namespace of the root is passed to children", function() {
render(root, [{tag: "svg"}])
o(root.childNodes[0].namespaceURI).equals("http://www.w3.org/2000/svg")
render(root.childNodes[0], [{tag: "g"}])
o(root.childNodes[0].childNodes[0].namespaceURI).equals("http://www.w3.org/2000/svg")
})
})