-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
```js
import { attr, derived, el, on, signal } from "/ef.js";
const $opened = signal(false);
querySelector("#demo").appendChild(
el(
"label",
[],
[
el("input", [
attr("type", "checkbox"),
on("input", (ev) => {
$opened.set(ev.currentTarget.checked);
}),
]),
derived(() => ($opened.get() ? "Checked" : "Unchecked")),
],
),
);
```
ef.js (`@pocka/ef`) is a small JavaScript library that helps writing DOM manipulation in a declarative manner.
- [Introduction](/docs/introduction/)
- [Downloads](/download/)
- [Usage](/docs/usage/)