mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-01 15:01:36 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
70f41e0c6c
10
src/htmx.js
10
src/htmx.js
@ -2484,7 +2484,7 @@ var htmx = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (triggerSpec.changed) {
|
if (triggerSpec.changed) {
|
||||||
const node = event.target
|
const node = evt.target
|
||||||
// @ts-ignore value will be undefined for non-input elements, which is fine
|
// @ts-ignore value will be undefined for non-input elements, which is fine
|
||||||
const value = node.value
|
const value = node.value
|
||||||
const lastValue = elementData.lastValue.get(triggerSpec)
|
const lastValue = elementData.lastValue.get(triggerSpec)
|
||||||
@ -2973,15 +2973,17 @@ var htmx = (function() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* `withExtensions` locates all active extensions for a provided element, then
|
* `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.
|
* be called internally at every extendable execution point in htmx.
|
||||||
*
|
*
|
||||||
* @param {Element} elt
|
* @param {Element} elt
|
||||||
* @param {(extension:HtmxExtension) => void} toDo
|
* @param {(extension:HtmxExtension) => void} toDo
|
||||||
|
* @param {string[]=} extensionsToIgnore
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
function withExtensions(elt, toDo) {
|
function withExtensions(elt, toDo, extensionsToIgnore) {
|
||||||
forEach(getExtensions(elt), function(extension) {
|
forEach(getExtensions(elt, [], extensionsToIgnore), function(extension) {
|
||||||
try {
|
try {
|
||||||
toDo(extension)
|
toDo(extension)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user