mirror of
https://github.com/jaandrle/deka-dom-el
synced 2024-11-25 09:49:36 +01:00
11 lines
293 B
JavaScript
11 lines
293 B
JavaScript
|
import { el, on } from "deka-dom-el";
|
||
|
const log= mark=> console.log.bind(console, mark);
|
||
|
|
||
|
const button= el("button", "Test click");
|
||
|
button.addEventListener("click", log("`addEventListener`"), { once: true });
|
||
|
on("click", log("`on`"), { once: true })(button);
|
||
|
|
||
|
document.body.append(
|
||
|
button
|
||
|
);
|