Improved
- dx: Improved type inference for
$.on
and$.once
in the Atomic Runtime. These utilities now intelligently infer the correct event type based on theEventTarget
, including support forHTMLElement
,Document
, andWindow
. Custom events continue to work seamlessly for unknown keys.
$.on(window, 'resize', evt => {
// evt is inferred as UIEvent
});
$.on(document, 'custom-event', (evt) => {
// evt is inferred as CustomEvent<...>
});