echoing-dress-67727
02/22/2023, 6:53 PMrefined-waiter-90422
02/22/2023, 7:32 PMenough-petabyte-50314
02/22/2023, 7:58 PMenough-petabyte-50314
02/22/2023, 8:45 PMmysterious-toddler-20573
02/22/2023, 9:09 PMmysterious-toddler-20573
02/22/2023, 9:09 PMenough-petabyte-50314
02/22/2023, 9:55 PMmysterious-toddler-20573
02/22/2023, 9:57 PMpowerful-football-56791
02/22/2023, 11:19 PMlimited-potato-46306
02/23/2023, 2:14 AM<div id="targetElement" x-on:myevent="performSomeJS()"></div>
Could the Hx-Trigger response header cause it to fire, rather than targeting the element that caused the request and bubbling up to the body?
Currently, as a workaround, I have an event listener on the element that caused the request and another event listener on the element that I would like to actually receive the event, and I use htmx.trigger("#targetElement", ...) to target the element that I would actually like to receive the event.limited-teacher-83117
02/23/2023, 2:47 AMHX-Trigger-OOB
limited-potato-46306
02/23/2023, 2:48 AMenough-petabyte-50314
02/23/2023, 3:39 PMmysterious-toddler-20573
02/23/2023, 4:10 PMmysterious-toddler-20573
02/23/2023, 4:10 PMsome-airline-73512
02/23/2023, 4:53 PMawait
to be highlighted, so I see immediately where async points are in the function. Another example I want to dimm asserts and logs, I don't care about those most of the time when reading code.
I'm pretty sure in JB it would be possible, but in VSCode it was just super simple to do, and because of this simplicity - I actually did it, whereas in JB I never did because I didn't knew it was possible.some-airline-73512
02/23/2023, 4:54 PMsome-airline-73512
02/23/2023, 4:55 PMsome-airline-73512
02/23/2023, 4:58 PMsome-airline-73512
02/23/2023, 4:59 PMenough-petabyte-50314
02/23/2023, 6:02 PMrefined-manchester-67193
02/23/2023, 6:06 PMhtmx-indicator
to appear on initial page load and subsequently get hidden? isn't supposed to be hidden on first page load?refined-manchester-67193
02/23/2023, 6:16 PMmysterious-car-3675
02/23/2023, 7:00 PMmysterious-toddler-20573
02/23/2023, 7:05 PMmysterious-toddler-20573
02/23/2023, 7:05 PMmysterious-toddler-20573
02/23/2023, 7:05 PMrefined-manchester-67193
02/23/2023, 7:22 PMjs
var ws_scheme = window.location.protocol == "http:" ? "ws" : "wss";
var ws_path = ws_scheme + '://' + window.location.host + "/";
var mysocket = new ReconnectingWebSocket(ws_path);
mysocket.maxReconnectAttempts = 3;
mysocket.timeoutInterval = 8000;
I'm almost 100% certain the mechanism described under "Automatic Reconnection" in the docs (https://htmx.org/extensions/web-sockets/) is better than my implementation, but just wanna be sure I'm not missing anything here?
ws
and wss
based on the HTTP(S) protocol?orange-umbrella-16693
02/23/2023, 8:42 PMorange-umbrella-16693
02/23/2023, 8:44 PM