🏠 New in High Baseline Support: Events

March 20, 2024

caniuse · mdn · [spec]([‘https://html.spec.whatwg.org/multipage/indices.html#events-2’, ‘https://dom.spec.whatwg.org/#interface-customevent’, ‘https://dom.spec.whatwg.org/#interface-eventtarget’])

Events fire when significant things happen in the page, such as an image loading or a user clicking. You can use the addEventListener() method on objects that receive events (event targets), such as windows, documents, and elements, to set a function to be called when an event fires.

Source features