What's the real difference between those two? I mean real, essential difference.
What's the future holding for regular createElement
?
Svg is xml, not html. I get that. So we use createElementNS(ns_string, 'svg')
And then setAttributeNS(null,,)
. Why?
Why not setAttributeNS('my_ns',,)
?
Why must ns_string
be http://www.w3.org/2000/svg
and not some random string? What's the purpose of a namespace if there is only one namespace?
What's the purpose of ns
in regular html? Should I change all instances of createElement
to createElementNS
in my existing code?
I am reading the DOM-Level-2 spec. but I'm still puzzled.