1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2024-11-25 09:49:36 +01:00
deka-dom-el/docs_src/components/examples/events/compare.js

11 lines
293 B
JavaScript
Raw Normal View History

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
);