createElementNS - how do I add attribute xmlns:xlink?



I see things like this on the net:



<svg
xmlns = "http://ift.tt/nvqhV5"
xmlns:xlink = "http://ift.tt/PGV9lw"
>


I create my element in javascript with



var eltSvg = document.createElementNS("http://ift.tt/nvqhV5", "svg");


However looking at the element in Google Chrome I see no attribute "xmlns" and no attribute "xmlns:xlink".


I guess that "xmlns" somehow is there (since that part works), but now I need to use "xmlns:xlink".


Is it there? Is there some standard for putting it there on the svg element?


No comments:

Post a Comment