4 ms·
I think the answer is no; for example one can use document.createElement(). I found that D3 was doing the equivalent of setting innerHTML.
by ridiculous_fish 8y ago
I think the answer is no; for example one can use document.createElement(). I found that D3 was doing the equivalent of setting innerHTML.
- jacobolus 8y agoNot sure about current browsers, but a few years ago setting innerHTML was significantly faster than the other DOM APIs. But in any event SVG path strings (and other element attributes) are inherently strings, there’s nothing you can do to get around that.