blob: acfb4c2d65c8a7ac3ae3fcc4834454c95f7eca9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<!DOCTYPE html>
<html>
<head>
<script src="386310-script.js"></script>
<script>
customElements.define("custom-element", class extends HTMLElement {
constructor() {
super();
const template = document.getElementById("template");
const shadowRoot = this.attachShadow({mode: "open"})
.appendChild(template.content.cloneNode(true));
var span = document.createComment("generated comment to prevent bug #36");
this.insertBefore(span, this.firstChild);
}
});
</script>
</head>
<body>
<template id="template">
<span></span>
<slot></slot>
</template>
<custom-element id="test" style="display: block;">first second third [fourth]</custom-element>
</body>
</html>
|