- From: autisticgeniushk <notifications@github.com>
- Date: Mon, 09 Apr 2018 07:08:03 +0000 (UTC)
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 9 April 2018 07:09:13 UTC
<div id=host></div>
<script>
const host = document.getElementById("host"),
shadow = host.attachShadow({ mode: "closed" }),
slot = shadow.appendChild(document.createElement("slot")),
df = document.createDocumentFragment(),
s1 = df.appendChild(document.createElement("script")),
s2 = df.appendChild(document.createElement("script"));
slot.addEventListener("slotchange", e => console.log(e));
s1.textContent = "df.appendChild(s1); df.appendChild(s2);";
s2.textContent = "console.log('hmm');";
host.appendChild(df);
</script>
<script>
customElements.define("ce-1", class CE1 extends HTMLElement {
constructor() {
super();
}
connectedCallback() {
console.log("ce-1 connected");
}
});
const df = document.createDocumentFragment(),
s = df.appendChild(document.createElement("script")),
ce1 = df.appendChild(document.createElement("ce-1"));
s.textContent = "df.appendChild(ce1);";
document.head.appendChild(df);
</script>
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/575#issuecomment-379655672
Received on Monday, 9 April 2018 07:09:13 UTC