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

🔤 texts helpers

infuture may be also translations
This commit is contained in:
2024-06-03 13:56:20 +02:00
parent 6dd5a582e7
commit 57fb9512ee
17 changed files with 418 additions and 362 deletions

View File

@ -0,0 +1,5 @@
const onchage=
event=>
console.log("Reacting to the:", event); // A
input.addEventListener("change", onchange); // B
input.dispatchEvent(new Event("change")); // C

View File

@ -0,0 +1,15 @@
import { el } from "deka-dom-el";
import { S } from "deka-dom-el/signals";
const clicks= S(0);
document.body.append(
el().append(
el("p", S(()=>
"Hello World "+"🎉".repeat(clicks())
)),
el("button", {
type: "button",
onclick: ()=> clicks(clicks()+1),
textContent: "Fire"
})
)
);