Bug 1874684 - Part 37: Fix unified compilation. r=allstarschh
[gecko.git] / layout / reftests / dom / multipleinsertionpoints-insertsingle-1-shadow.xhtml
blobdcefb2001751d2a2d5f6ee1a4fc4a19e14c6064e
1 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
2 <head>
3 <script>
4 customElements.define("custom-element", class extends HTMLElement {
5 constructor() {
6 super();
7 const template = document.getElementById("template");
8 const shadowRoot = this.attachShadow({mode: "open"})
9 .appendChild(template.content.cloneNode(true));
11 });
13 function boom()
15 document.body.offsetHeight;
17 var lastdiv = document.getElementById("last");
18 var parent = lastdiv.parentNode;
20 var newelt = document.createElement("span");
21 newelt.setAttribute("slot", "foo");
22 newelt.appendChild(document.createTextNode(2));
23 parent.insertBefore(newelt, lastdiv);
25 document.body.offsetHeight;
26 document.documentElement.className = "";
28 </script>
30 </head>
31 <body onload="boom();">
32 <template id="template">
33 <div>
34 <slot name="foo"/>
35 </div>
36 <div>
37 <slot/>
38 </div>
39 </template>
40 <custom-element style="display: block;">
41 <div>3</div><span slot="foo">1</span><div>4</div><div id="last">5</div>
42 </custom-element>
43 </body>
44 </html>