1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-07-01 12:22:15 +02:00

🐛 Fixes update of dataset/classList

This commit is contained in:
2025-02-18 22:03:36 +01:00
parent e884f871b0
commit b347bdffc1
6 changed files with 2277 additions and 1585 deletions

View File

@ -15,10 +15,14 @@ export function fullNameComponent(){
on.disconnected(()=> console.log(fullNameComponent))
);
const count= S(0);
setInterval(()=> count(count()+1), 5000);
const style= { height: "80px", display: "block", fill: "currentColor" };
const elSVG= elNS("http://www.w3.org/2000/svg");
return el("div", { className }).append(
el("h2", "Simple form:"),
el("p", { textContent: S(()=> "Count: "+count()),
dataset: { count }, classList: { count: S(() => count()%2 === 0) } }),
el("form", { onsubmit: ev=> ev.preventDefault() }).append(
...name.map((v, i)=>
el("label", labels[i]).append(