2 ms·
my hack for making the `htmx:confirm` event act like it is blocking: https://github.com/bigskysoftware/htmx/blob/a3c414dcee94fd0351d5cbf622773fc982232204/src/h
by recursivedoubts 4y ago
my hack for making the `htmx:confirm` event act like it is blocking:
https://github.com/bigskysoftware/htmx/blob/a3c414dcee94fd0351d5cbf622773fc982232204/src/htmx.js#L2650 https://github.com/bigskysoftware/htmx/blob/a3c414dcee94fd03...
basically, redesign the arguments for a function such that I can call it again at a given spot with one parameter changed and, to a first order approximation, it acts as if the function is resumable.
I've used this trick in a few places now, just recently in idiomorph to allow head elements to load before the rest of the content is morphed:
https://github.com/bigskysoftware/idiomorph/blob/e6dfc189fa31a6d50b1e604153aa6fe7a04a0b2e/src/idiomorph.js#L47 https://github.com/bigskysoftware/idiomorph/blob/e6dfc189fa3...