Debug: log every bind-event click handler firing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
// =========================================================================
|
// =========================================================================
|
||||||
|
|
||||||
var NIL = Object.freeze({ _nil: true, toString: function() { return "nil"; } });
|
var NIL = Object.freeze({ _nil: true, toString: function() { return "nil"; } });
|
||||||
var SX_VERSION = "2026-03-06T21:44:48Z";
|
var SX_VERSION = "2026-03-06T21:50:58Z";
|
||||||
|
|
||||||
function isNil(x) { return x === NIL || x === null || x === undefined; }
|
function isNil(x) { return x === NIL || x === null || x === undefined; }
|
||||||
function isSxTruthy(x) { return x !== false && !isNil(x); }
|
function isSxTruthy(x) { return x !== false && !isNil(x); }
|
||||||
@@ -1842,7 +1842,8 @@ return postSwap(target); });
|
|||||||
var timer = NIL;
|
var timer = NIL;
|
||||||
var lastVal = NIL;
|
var lastVal = NIL;
|
||||||
var listenTarget = (isSxTruthy(get(mods, "from")) ? domQuery(get(mods, "from")) : el);
|
var listenTarget = (isSxTruthy(get(mods, "from")) ? domQuery(get(mods, "from")) : el);
|
||||||
return (isSxTruthy(listenTarget) ? domAddListener(listenTarget, eventName, function(e) { return (function() {
|
return (isSxTruthy(listenTarget) ? domAddListener(listenTarget, eventName, function(e) { logInfo((String("sx:bind-event fired: ") + String(eventName) + String(" on ") + String(domTagName(el))));
|
||||||
|
return (function() {
|
||||||
var shouldFire = true;
|
var shouldFire = true;
|
||||||
if (isSxTruthy(get(mods, "changed"))) {
|
if (isSxTruthy(get(mods, "changed"))) {
|
||||||
(function() {
|
(function() {
|
||||||
|
|||||||
@@ -373,6 +373,7 @@
|
|||||||
(when listen-target
|
(when listen-target
|
||||||
(dom-add-listener listen-target event-name
|
(dom-add-listener listen-target event-name
|
||||||
(fn (e)
|
(fn (e)
|
||||||
|
(log-info (str "sx:bind-event fired: " event-name " on " (dom-tag-name el)))
|
||||||
(let ((should-fire true))
|
(let ((should-fire true))
|
||||||
;; Changed modifier: skip if value unchanged
|
;; Changed modifier: skip if value unchanged
|
||||||
(when (get mods "changed")
|
(when (get mods "changed")
|
||||||
|
|||||||
Reference in New Issue
Block a user