From 11a8e9c6c242fec1dcc20964ab7f8bb8f15f4930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20Guzm=C3=A1n?= <77210010+namzug16@users.noreply.github.com> Date: Mon, 2 Jun 2025 18:56:51 +0200 Subject: [PATCH 1/2] Feature: add extensionsToIgnore to withExtensions (#3195) feat: add extensionsToIgnore to withExtensions --- src/htmx.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/htmx.js b/src/htmx.js index ff2d4db1..9d72c755 100644 --- a/src/htmx.js +++ b/src/htmx.js @@ -2973,15 +2973,17 @@ var htmx = (function() { /** * `withExtensions` locates all active extensions for a provided element, then - * executes the provided function using each of the active extensions. It should + * executes the provided function using each of the active extensions. You can filter + * the element's extensions by giving it a list of extensions to ignore. It should * be called internally at every extendable execution point in htmx. * * @param {Element} elt * @param {(extension:HtmxExtension) => void} toDo + * @param {string[]=} extensionsToIgnore * @returns void */ - function withExtensions(elt, toDo) { - forEach(getExtensions(elt), function(extension) { + function withExtensions(elt, toDo, extensionsToIgnore) { + forEach(getExtensions(elt, [], extensionsToIgnore), function(extension) { try { toDo(extension) } catch (e) { From e4ecc55586b589cc7252dfd9b4a736ef65831b8e Mon Sep 17 00:00:00 2001 From: JacobMonticello <79179816+JacobMonticello@users.noreply.github.com> Date: Mon, 2 Jun 2025 12:57:46 -0400 Subject: [PATCH 2/2] Typo in addEventListener - use evt instead of event (#3188) Use evt instead of event Co-authored-by: Jacob monticello --- src/htmx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/htmx.js b/src/htmx.js index 9d72c755..7b1d9b57 100644 --- a/src/htmx.js +++ b/src/htmx.js @@ -2484,7 +2484,7 @@ var htmx = (function() { } } if (triggerSpec.changed) { - const node = event.target + const node = evt.target // @ts-ignore value will be undefined for non-input elements, which is fine const value = node.value const lastValue = elementData.lastValue.get(triggerSpec)