mirror of
https://github.com/jaandrle/deka-dom-el
synced 2024-11-22 16:55:23 +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
|
||
|
);
|