From 74428cc433a12d23517d8872dd819deaf8d038a6 Mon Sep 17 00:00:00 2001 From: giles Date: Fri, 6 Mar 2026 21:58:43 +0000 Subject: [PATCH] Debug: log verbInfo method and url in click handler Co-Authored-By: Claude Opus 4.6 --- shared/static/scripts/sx-browser.js | 4 ++-- shared/sx/ref/orchestration.sx | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/shared/static/scripts/sx-browser.js b/shared/static/scripts/sx-browser.js index 91cbabd..5598d02 100644 --- a/shared/static/scripts/sx-browser.js +++ b/shared/static/scripts/sx-browser.js @@ -14,7 +14,7 @@ // ========================================================================= var NIL = Object.freeze({ _nil: true, toString: function() { return "nil"; } }); - var SX_VERSION = "2026-03-06T21:57:37Z"; + var SX_VERSION = "2026-03-06T21:58:38Z"; function isNil(x) { return x === NIL || x === null || x === undefined; } function isSxTruthy(x) { return x !== false && !isNil(x); } @@ -1842,7 +1842,7 @@ return postSwap(target); }); var timer = NIL; var lastVal = NIL; 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")))); + 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")))); return (function() { var shouldFire = true; if (isSxTruthy(get(mods, "changed"))) { diff --git a/shared/sx/ref/orchestration.sx b/shared/sx/ref/orchestration.sx index f03e35c..3e8d52f 100644 --- a/shared/sx/ref/orchestration.sx +++ b/shared/sx/ref/orchestration.sx @@ -373,7 +373,10 @@ (when listen-target (dom-add-listener listen-target event-name (fn (e) - (log-info (str "sx:click " event-name " " (dom-tag-name el) " href=" (dom-get-attr el "href"))) + (log-info (str "sx:click " event-name " " (dom-tag-name el) + " href=" (dom-get-attr el "href") + " method=" (get verbInfo "method") + " url=" (get verbInfo "url"))) (let ((should-fire true)) ;; Changed modifier: skip if value unchanged (when (get mods "changed")