Open gburca opened 1 year ago
so, not exactly a solution, but might get someone one step closer to implementing a fix:
https://jsfiddle.net/wzsy8p5j/1/
specifically, if you have an
if you instead use createElementNS('http://www.w3.org/2000/svg', 'circle')
and append the result to the svg, the circle renders just fine. surprise again!
i suspect this is a very old quirk present from when SVGs were namespace-aware (i checked multiple browsers), and suggests "magic" is performed when an SVG fragment is loaded (where the xmlns is implied for all elements within the fragment, historically SVGs were encapsulated within Githubissues.
See: http://jsfiddle.net/gburca/hwb92esf/33/
The generated HTML looks identical, yet the 1st SVG drawing is not displaying the circles (even though they're in the generated HTML). The 2nd drawing (which doesn't use templates) displays them properly.