152
rated 0 times
[
154]
[
2]
/ answers: 1 / hits: 80659
/ 14 Years ago, thu, september 9, 2010, 12:00:00
In HTML, I can clear a <div>
element with this command:
div.innerHTML = ;
Is there an equivalent if I have an <svg>
element? I can't find an innerHTML
nor innerXML
or even innerSVG
method.
I know the SVG DOM is a superset of the XML DOM, so I know I can do something like this:
while (svg.lastChild) {
svg.removeChild(svg.lastChild);
}
But this is both tedious and slow. Is there a faster or easier way to clear an SVG element?
More From » xml