1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-07-02 20:52:14 +02:00

ce wip

This commit is contained in:
2024-06-07 10:04:34 +02:00
parent 0bc0e0c64d
commit a5efbd236c
4 changed files with 27 additions and 6 deletions

View File

@ -11,7 +11,13 @@ customElementWithDDE(HTMLCustomElement);
customElements.define(HTMLCustomElement.tagName, HTMLCustomElement);
const instance= el(HTMLCustomElement.tagName);
on.connected(e=> console.log("Element connected to the DOM:", e))(instance);
on.connected( // preffered
e=> console.log("Element connected to the DOM (v1):", e)
)(instance);
instance.addEventListener(
"dde:connected",
e=> console.log("Element connected to the DOM (v2):", e)
);
document.body.append(
instance,
);