1 <?xml version=
"1.0" standalone=
"no"?>
2 <!DOCTYPE svg PUBLIC
"-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3 <svg id=
"svg" viewBox=
"0 0 100 30" version=
"1.1" xmlns=
"http://www.w3.org/2000/svg" xmlns:
xlink=
"http://www.w3.org/1999/xlink">
5 <rect id=
"rect" width=
"60" height=
"10"/>
8 <text x=
"30" y=
"30" transform=
"scale(0.2 0.2)">Hover over the rectangle - it should not crash
</text>
9 <use id=
"use" x=
"20" y=
"10" xlink:
href=
"#rect" />
13 var svg = document.getElementById(
"svg");
14 var use = document.getElementById(
"use");
16 function addUseElement() {
17 svg.appendChild(use, true);
18 setTimeout(removeUseElement,
50);
21 function removeUseElement() {
22 use.parentElement.removeChild(use);
23 setTimeout(addUseElement,
50);
26 document.addEventListener(
"DOMNodeInserted", function() {}, true);