d3 / d3-selection

Transform the DOM by selecting elements and joining to data.

Home Page:https://d3js.org/d3-selection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.append() removes XML Namespaces from tag-names

jerng opened this issue · comments

commented

Using Version 5.

I tried to do a .append ( 'html:div ) and the output was simply <div />.

Is this intentional?

Citation: https://www.w3schools.com/xml/xml_namespaces.asp

commented

Sorry, I just found this, which seems to indicate that this intentional.

https://github.com/d3/d3-selection#namespaces

The weird thing is d3 works as described, but if I inspect the DOM, the elements and attributes created under a namespace don't seem to have the relevant XMLNS attributes/prefixes, yet they render as if they do!