mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-22 17:01:54 +00:00
16 lines
422 B
HTML
16 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>
|