pota/use/eventpota/use/event collects small, low-level helpers for working with
DOM events: stop helpers you can drop into on:* handlers, a
CustomEvent emitter, a promise-based waitEvent, and explicit
addEventListener / removeEventListener wrappers that accept
options objects. (For JSX events the on:* prop is already idiomatic
— reach here for listeners on window / document / manually-acquired
nodes.)
preventDefault(e) /
stopPropagation(e) /
stopImmediatePropagation(e)
— one-method stop helpersstopEvent(e) — all stop methods at onceemit(node, name, init?) — dispatch a
CustomEventwaitEvent(element, name) — promise for the
next matching eventaddEventNative /
removeEventNative —
addEventListener wrappers with options supportpassiveEvent(fn) — wrap a handler as a
passive listener