mysterious-toddler-20573
10/29/2022, 6:51 PMbrainy-ice-92385
10/29/2022, 6:55 PMmysterious-toddler-20573
10/29/2022, 6:58 PMbitter-machine-55943
10/29/2022, 11:31 PMmysterious-toddler-20573
10/30/2022, 1:54 AMmysterious-toddler-20573
10/30/2022, 1:54 AMhtmx:beforeSend
eventmysterious-toddler-20573
10/30/2022, 1:55 AMmysterious-toddler-20573
10/30/2022, 1:55 AMmysterious-toddler-20573
10/30/2022, 1:55 AMmysterious-toddler-20573
10/30/2022, 1:56 AMbitter-machine-55943
10/30/2022, 2:09 AMdefineExtension
with init
and htmx.on
for the events you want, vs using onEvent
and checking for the event types with if
?mysterious-toddler-20573
10/30/2022, 2:11 AMbitter-machine-55943
10/30/2022, 2:15 AMmysterious-toddler-20573
10/30/2022, 2:18 AMmysterious-toddler-20573
10/30/2022, 2:18 AMmysterious-toddler-20573
10/30/2022, 2:18 AMbitter-machine-55943
10/30/2022, 2:49 AMbitter-machine-55943
10/30/2022, 3:04 AMhtmx:afterSwap
?red-dinner-66239
10/30/2022, 11:07 AMbitter-monkey-50309
10/30/2022, 2:00 PMhtmx:beforeRequest
or htmx:beforeSend
events. You can write a little bit of Javascript (or hyperscript) to check if the popup is open and if it is use htmx:abort
to cancel the requestboundless-vase-80440
10/30/2022, 2:33 PMripe-action-67367
10/30/2022, 3:37 PMmodern-wall-92403
10/30/2022, 5:17 PMcuddly-keyboard-70746
10/30/2022, 5:26 PMcuddly-keyboard-70746
10/30/2022, 5:28 PMmodern-wall-92403
10/30/2022, 5:34 PMbitter-machine-55943
10/30/2022, 6:06 PMhtmx.defineExtension(…)
while others are wrapped in (function(){…})()
?bitter-machine-55943
10/30/2022, 6:23 PMhtmx.defineExtension
call doesn’t add anything to the global namespace, and wrapping in (function()…)()
is used when variables are created but you don’t want to pollute the global namespace?mysterious-toddler-20573
10/30/2022, 6:27 PM(function(){.. })()
form when I want to have some shared state across all the extension points. That's the old school JavaScript trick for that.mysterious-toddler-20573
10/30/2022, 7:00 PM