4 <svg style=
"width:200px; height: 200px">
5 <g id=
"container" style=
"fill: green"></g>
6 <text id=
"text" y=
90><text id=
"sentinel"></text></text>
7 <g id=
"container2" style=
"fill: green"></g>
11 if (window
.testRunner
)
12 testRunner
.dumpAsText();
14 var container
= document
.getElementById("container");
15 container
.insertAdjacentHTML("beforeBegin", "<text y=10>1 (black)</text>");
16 container
.insertAdjacentHTML("afterBegin", "<text y=30>2 (green)</text>");
17 container
.insertAdjacentHTML("beforeEnd", "<text y=50>3 (green)</text>");
18 container
.insertAdjacentHTML("afterEnd", "<text y=70>4 (black)</text>");
20 document
.getElementById("text").insertAdjacentText("afterBegin", "5");
21 document
.getElementById("sentinel").insertAdjacentText("beforeBegin", "6");
22 document
.getElementById("sentinel").insertAdjacentText("afterEnd", "7");
23 document
.getElementById("text").insertAdjacentText("beforeEnd", "8");
25 var container2
= document
.getElementById("container2");
27 var element
= document
.createElementNS("http://www.w3.org/2000/svg", "text");
28 element
.textContent
= "9";
29 element
.setAttribute('y', 110);
30 container2
.insertAdjacentElement("beforeBegin", element
);
32 element
= document
.createElementNS("http://www.w3.org/2000/svg", "text");
33 element
.textContent
= "10";
34 element
.setAttribute('y', 130);
35 container2
.insertAdjacentElement("afterBegin", element
);
37 element
= document
.createElementNS("http://www.w3.org/2000/svg", "text");
38 element
.textContent
= "11";
39 element
.setAttribute('y', 150);
40 container2
.insertAdjacentElement("beforeEnd", element
);
42 element
= document
.createElementNS("http://www.w3.org/2000/svg", "text");
43 element
.textContent
= "12";
44 element
.setAttribute('y', 170);
45 container2
.insertAdjacentElement("afterEnd", element
);