Quick Tip: Avoid Event Listeners on the “window” Object, by @nattarnoff.bsky.social:

https://tarnoff.info/2025/06/13/quick-tip-avoid-event-listeners-on-the-window-object/

#javascript #jquery #events #accessibility #tipsandtricks

Quick Tip: Avoid event listeners on the window object

If you are old enough, you remember what JavaScript life was like before jQuery. That framework set up some of the functions we depend on in Vanilla JS to do the most basic work. Like event listene…

Nat Tarnoff
@frontenddogma "should improve performance" - I'm not doubting it, but I seem to remember that having a single event listener was *meant* to be more performant than having many of them at the time when jQuery was doing it