Results 49 comments of Ivan Gonzalez

> Why have you added that load event? It seems unrelated to the rest of the PR. Would it be appropriate as a separate PR? It's related because the code...

it works because `window.event = DOMContentLoaded`. whenever a new node is hx swapped into the dom, it won't have that event and will be undefined as you mention > window.event...

here is the example I crafted (like said above) that doesn't work https://playcode.io/2576793

Nice improvement. I agree the "load" terrain is a bit muddy because you have - [DOMContentLoaded event](https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event) - [load event](https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event) - htmx load event (after swapping) so actually `load` is...

I added your changes Michael and tests ``` hx-headers attribute [Chromium] ... ✓ using js: with hx-headers has event available ✓ using js: with hx-headers has event available on load...

Is that not desired? Honestly looking at it feels intuitive that it should log, isn't it?

that's a good point. considering that the standard [load event](https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event) is triggered (only) on the window and does not bubble either, > This event is not cancelable and **does not...

@MichaelWest22 do we move with this PR? also, I would like to try to implement it in htmx 4, what do you think?

I have the same issue. Researching, looks like you need to explicitly export them in `__all__` https://github.com/microsoft/pyright/issues/2639 I will make a PR