mysterious-toddler-20573
02/26/2021, 8:14 PMlittle-librarian-31218
02/26/2021, 8:14 PMlittle-librarian-31218
02/26/2021, 8:14 PMmysterious-toddler-20573
02/26/2021, 8:14 PMmysterious-toddler-20573
02/26/2021, 8:15 PMhtml
<whatever id="foo" hx-swap-oob="innerHTML">...<whatever>mysterious-toddler-20573
02/26/2021, 8:15 PMlittle-librarian-31218
02/26/2021, 8:20 PMlittle-librarian-31218
02/26/2021, 8:20 PMlittle-librarian-31218
02/26/2021, 8:21 PMlittle-librarian-31218
02/26/2021, 8:24 PMmysterious-toddler-20573
02/26/2021, 8:27 PMmysterious-toddler-20573
02/26/2021, 8:27 PMlittle-librarian-31218
02/26/2021, 8:30 PMmysterious-toddler-20573
02/26/2021, 9:25 PMgentle-dream-18175
02/26/2021, 9:31 PMissueAjaxRequest function really looks like it needs some partializing lovin'.gentle-dream-18175
02/26/2021, 9:36 PMlittle-librarian-31218
02/26/2021, 9:37 PMmysterious-toddler-20573
02/26/2021, 9:40 PMmysterious-toddler-20573
02/26/2021, 9:41 PMmysterious-toddler-20573
02/26/2021, 9:41 PMgentle-dream-18175
02/26/2021, 9:41 PMnull, null, null in a function signature i reach for a partial to be more semantic about what's whatmysterious-toddler-20573
02/26/2021, 9:43 PMgentle-dream-18175
02/26/2021, 9:43 PMmysterious-toddler-20573
02/26/2021, 9:43 PMmysterious-toddler-20573
02/26/2021, 9:44 PMgorgeous-ghost-95789
02/26/2021, 11:49 PMmillions-painter-4817
02/27/2021, 4:07 AM...
<body>
<div id="thePlaceHolder1">WILL BE ERASED 1</div>
<div id="thePlaceHolder2">WILL BE ERASED 2</div>
</body>
<script>
//htmx.logAll();
const sDebugStyle = 'background-color:coral;color:purple;'
htmx.on("htmx:configRequest", function(evt){
console.log("%chtmx:configRequest", sDebugStyle, evt);
});
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
;(async() => {
htmx.ajax("GET", "/b.html", "#thePlaceHolder1");
await sleep(10);
htmx.ajax("GET", "/c.html", "#thePlaceHolder2");
})();
</script>
htmx.logAll(); trap all event , but
htmx.on("htmx:configRequest" ... failed to log first ajax request, with three ajax request only the first one is dropped
the solution i found is to put an await sleep(10); before first htmx.ajax but i coudl'nt understand why logAll() caught it without the sleep(10)hallowed-pharmacist-2233
02/27/2021, 4:46 AMhallowed-pharmacist-2233
02/27/2021, 4:48 AM