Re: [whatwg/dom] Allow custom activation behavior to be added to an event (Issue #1320)

For input fields and forms, we have "change" and "submit" events as happening after processing a lower level input like click, keydown, keyup, enter, drag-and-drop, clipboard paste, etc.

What if anchor elements emitted an event like "navigate" or "activate" which wouldn't be cancellable, to happen when performing the action, regardless of how it was triggers and whether it was cancelled? This would have the benefit of allowing you to listen declaratively (instead of attaching it just-in-time), as well as naturally sharing the function, and allowing for delegation to listen from a parent or ancestor element for this event across a wider range of elements, without needing to select and attach on each one.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/1320#issuecomment-2457911731
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/issues/1320/2457911731@github.com>

Received on Tuesday, 5 November 2024 18:43:32 UTC