From 64acc82b9634d948517ec5bb2ebe5a33cdf22df6 Mon Sep 17 00:00:00 2001 From: Petri Hienonen Date: Fri, 14 Nov 2025 21:39:29 +0200 Subject: Cleanup --- app/dom.js | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'app/dom.js') diff --git a/app/dom.js b/app/dom.js index 9ea7bf9..9473bf1 100644 --- a/app/dom.js +++ b/app/dom.js @@ -80,7 +80,7 @@ export class Dom { if (text) button.textContent = text; for (const [k, v] of Object.entries(o.attributes)) button.setAttribute(k, v); if (o.children) button.append(...o.children); - if (onClick) button.addEventListener("click", onClick); + if (onClick) button.addEventListener("pointerdown", onClick); return button; } @@ -192,13 +192,15 @@ export class Dom { /** * Create a `