mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
17 lines
422 B
HTML
17 lines
422 B
HTML
<todo-item></todo-item>
|
|
<script>
|
|
const template = document.createElement("template");
|
|
template.innerHTML = `<li></li>`;
|
|
|
|
class TodoItem extends HTMLElement {
|
|
constructor() {
|
|
super();
|
|
const shadow = this.attachShadow({ mode: "open" });
|
|
const node = document.importNode(template.content, true);
|
|
shadow.appendChild(node);
|
|
}
|
|
}
|
|
|
|
customElements.define("todo-item", TodoItem);
|
|
</script>
|