Debug: log each isGetLink condition individually

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 21:59:58 +00:00
parent 5ea0f5c546
commit 719dfbf732
2 changed files with 8 additions and 11 deletions

View File

@@ -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:59:13Z"; var SX_VERSION = "2026-03-06T21:59:54Z";
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,7 @@ 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) { logInfo((String("sx:click ") + String(eventName) + String(" ") + String(domTagName(el)) + String(" href=") + String(domGetAttr(el, "href")) + String(" method=") + String(get(verbInfo, "method")) + String(" url=") + String(get(verbInfo, "url")) + String(" delay=") + String(get(mods, "delay")) + String(" isGetLink=") + String((isSxTruthy((eventName == "click")) && isSxTruthy((get(verbInfo, "method") == "GET")) && isSxTruthy(domHasAttr(el, "href")) && !get(mods, "delay"))))); return (isSxTruthy(listenTarget) ? domAddListener(listenTarget, eventName, function(e) { logInfo((String("sx:click") + String(" c1=") + String((eventName == "click")) + String(" c2=") + String((get(verbInfo, "method") == "GET")) + String(" c3=") + String(domHasAttr(el, "href")) + String(" c4=") + String(!get(mods, "delay")) + String(" href=") + String(domGetAttr(el, "href"))));
return (function() { return (function() {
var shouldFire = true; var shouldFire = true;
if (isSxTruthy(get(mods, "changed"))) { if (isSxTruthy(get(mods, "changed"))) {

View File

@@ -373,15 +373,12 @@
(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:click " event-name " " (dom-tag-name el) (log-info (str "sx:click"
" href=" (dom-get-attr el "href") " c1=" (= event-name "click")
" method=" (get verbInfo "method") " c2=" (= (get verbInfo "method") "GET")
" url=" (get verbInfo "url") " c3=" (dom-has-attr? el "href")
" delay=" (get mods "delay") " c4=" (not (get mods "delay"))
" isGetLink=" (and (= event-name "click") " href=" (dom-get-attr el "href")))
(= (get verbInfo "method") "GET")
(dom-has-attr? el "href")
(not (get mods "delay")))))
(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")