Skip to content

Commit

Permalink
prep release
Browse files Browse the repository at this point in the history
  • Loading branch information
1cg committed Apr 28, 2023
1 parent 9ee51a5 commit c139d64
Show file tree
Hide file tree
Showing 206 changed files with 123,279 additions and 11 deletions.
11 changes: 6 additions & 5 deletions dist/htmx.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ return (function () {
sock.binaryType = htmx.config.wsBinaryType;
return sock;
},
version: "1.9.1"
version: "1.9.2"
};

/** @type {import("./htmx").HtmxInternalApi} */
Expand Down Expand Up @@ -921,8 +921,9 @@ return (function () {
});
}
if (internalData.onHandlers) {
for (var eventName of internalData.onHandlers) {
element.removeEventListener(eventName, internalData.onHandlers[eventName]);
for (let i = 0; i < internalData.onHandlers.length; i++) {
const handlerInfo = internalData.onHandlers[i];
element.removeEventListener(handlerInfo.name, handlerInfo.handler);
}
}
}
Expand Down Expand Up @@ -1867,12 +1868,12 @@ return (function () {

function addHxOnEventHandler(elt, eventName, code) {
var nodeData = getInternalData(elt);
nodeData.onHandlers ||= {};
nodeData.onHandlers = [];
var func = new Function("event", code + "; return;");
var listener = elt.addEventListener(eventName, function (e) {
return func.call(elt, e);
});
nodeData.onHandlers[eventName] = listener;
nodeData.onHandlers.push({event:eventName, listener:listener});
return {nodeData, code, func, listener};
}

Expand Down
2 changes: 1 addition & 1 deletion dist/htmx.min.js

Large diffs are not rendered by default.

Binary file modified dist/htmx.min.js.gz
Binary file not shown.
Loading

0 comments on commit c139d64

Please sign in to comment.