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

Create DocumentFragment also with el()

This commit is contained in:
2023-11-06 14:04:27 +01:00
parent 324727cc0a
commit 0d70189908
14 changed files with 24 additions and 27 deletions

View File

@ -15,7 +15,7 @@ export function example({ src, language= "javascript" }){
.toString()
.replaceAll(' from "../../../index-with-signals.js";', ' from "https://cdn.jsdelivr.net/gh/jaandrle/deka-dom-el/dist/esm-with-signals.js";');
const id= "code-"+Math.random().toString(36).slice(2, 7);
return el("<>").append(
return el().append(
el("div", { id, className: example.name }).append(
el("pre").append(
el("code", { className: "language-"+language, textContent: code })

View File

@ -1,7 +1,7 @@
import { el, S } from "../../../index-with-signals.js";
const clicks= S(0);
document.body.append(
el("<>").append(
el().append(
el("p", S(()=>
"Hello World "+"🎉".repeat(clicks())
)),