echoing-dress-67727
02/13/2023, 9:31 PMmysterious-toddler-20573
02/13/2023, 9:55 PMcareful-room-54859
02/14/2023, 12:35 AM<script>
tag TWICE when I include one. Is this normal?best-fireman-79576
02/14/2023, 7:05 AMrefined-waiter-90422
02/14/2023, 7:23 AMonclick=""
gifted-caravan-48512
02/14/2023, 9:50 AMmicroscopic-art-61410
02/14/2023, 11:55 AMjs
htmx.defineExtension('attrs-swap', {
isInlineSwap: function(swapStyle) {
console.log("ATTRS-SWAP: isInlineSwap", swapStyle);
return swapStyle === 'attrs';
},
handleSwap: function(swapStyle, target, fragment) {
console.log("ATTRS-SWAP: handleSwap", swapStyle, target, fragment);
}
});
and then loading the following fragment of html...
html
<li hx-ext="attrs-swap" hx-swap-oob="attrs:li.my-item" class="active"></li>
but neither extension method appears to be hit, nothing is logged, but the element is still swapped. Am I doing something wrong, or is this not support with oob swaps?little-country-79193
02/14/2023, 2:11 PMhx-preserve="true"
on the script tag and it should stop re-rendering that script tag. If that doesn't work, exclude the script tag from the htmx responsemysterious-car-3675
02/14/2023, 4:23 PMhx-trigger
. From the docs it seems like the naming is not correct. The current throttle:1s
is really a trailing throttle. Usually a throttle would trigger the event immediately but then ignore until the delay. RXJS actually has a lot of really useful options here. Looks like all the logic is at https://github.com/bigskysoftware/htmx/blob/master/src/htmx.js#L1378-L1385 . I'm trying to move from a site that uses pretty heavy use of these different constructs. Is this something htmx users would be interested in or is it antithetical to the paradigm?mysterious-car-3675
02/14/2023, 4:26 PMtall-dinner-62086
02/14/2023, 4:29 PMmysterious-car-3675
02/14/2023, 4:30 PMtall-dinner-62086
02/14/2023, 4:30 PMmysterious-car-3675
02/14/2023, 4:32 PMmysterious-car-3675
02/14/2023, 4:33 PMtall-dinner-62086
02/14/2023, 4:34 PMtall-dinner-62086
02/14/2023, 4:34 PMmysterious-toddler-20573
02/14/2023, 4:36 PMmysterious-car-3675
02/14/2023, 4:36 PMmysterious-car-3675
02/14/2023, 5:01 PMmysterious-toddler-20573
02/14/2023, 5:08 PMmysterious-toddler-20573
02/14/2023, 5:08 PMmysterious-toddler-20573
02/14/2023, 5:08 PMclean-piano-67951
02/14/2023, 11:08 PMclean-piano-67951
02/14/2023, 11:08 PMclean-piano-67951
02/14/2023, 11:09 PMmysterious-car-3675
02/15/2023, 2:57 AM