mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-04-02 20:15:53 +02:00
* :tap: removed on.attributeChanged and static observedAttributes * ⚡ import optimalization * ⚡ scope.signal * 🔤 🐛 * ⚡ 🐛 registerReactivity and types * 🔤 * ⚡ * 🔤 * 🐛 Node in enviroment * ⚡ todos * ⚡ * ⚡ 🔤 * ⚡ lint * ⚡ memo * 🔤 🐛 memo * ⚡ 🔤 todomvc * 🐛 types * 🔤 p08 signal factory * 🔤 ⚡ types * ⚡ 🔤 lint * 🔤 * 🔤 * 🔤 * 🔤 * 📺
20 lines
419 B
JavaScript
20 lines
419 B
JavaScript
import { el, on, dispatchEvent, scope } from "deka-dom-el";
|
|
document.body.append(
|
|
el(component),
|
|
);
|
|
|
|
function component(){
|
|
const { host }= scope;
|
|
const dispatchExample= dispatchEvent(
|
|
"example",
|
|
{ bubbles: true },
|
|
host
|
|
);
|
|
|
|
return el("div").append(
|
|
el("p", "Dispatch events from outside of the component."),
|
|
el("button", { textContent: "Dispatch", type: "button" },
|
|
on("click", dispatchExample))
|
|
);
|
|
}
|