From fb8dbeba9ffbf6c3fc6ec317a2743175fdd0d045 Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 25 Mar 2026 14:56:34 +0000 Subject: [PATCH] Fix dom-listen: rename dom-on to dom-listen in dom.sx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit adapter-dom.sx defines dom-on as a wrapper around dom-listen (adds post-render hooks). But dom-listen was never defined — my earlier dom-on in dom.sx was overwritten by the adapter's version. Rename to dom-listen so the adapter's dom-on can call it. This fixes click handlers not firing on island buttons (stepper, stopwatch, counter, etc.). Co-Authored-By: Claude Opus 4.6 (1M context) --- shared/static/wasm/sx/dom.sx | 2 +- web/lib/dom.sx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/static/wasm/sx/dom.sx b/shared/static/wasm/sx/dom.sx index e2021db1..e8506300 100644 --- a/shared/static/wasm/sx/dom.sx +++ b/shared/static/wasm/sx/dom.sx @@ -97,7 +97,7 @@ (fn (child parent) (and child parent (host-call parent "contains" child)))) -(define dom-on +(define dom-listen (fn (el event-name handler) (host-call el "addEventListener" event-name (host-callback handler)))) diff --git a/web/lib/dom.sx b/web/lib/dom.sx index e2021db1..e8506300 100644 --- a/web/lib/dom.sx +++ b/web/lib/dom.sx @@ -97,7 +97,7 @@ (fn (child parent) (and child parent (host-call parent "contains" child)))) -(define dom-on +(define dom-listen (fn (el event-name handler) (host-call el "addEventListener" event-name (host-callback handler))))