Re: [w3ctag/design-reviews] Dispatching Toggle Events for Dialog open/close (Issue #1005)

My intuition and experience with using these suggests that opening and closing `<details>` and `<dialog>` has very different reactions in a lot of cases.  I would expect to see "toggle" handlers that have `if (e.newState) {} else {}` at the top level.  I can see commonality in "open"/"close" handlers, but that seems less common and it can be handled with `el.onopen = handleToggle.bind(true); el.onclose = handleToggle.bind(false)` or similar.  Choosing requires an understanding of how it might be used in practice.

... or you could ship both, but that seems like a premature commitment to waste.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/1005#issuecomment-2445576178
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/1005/2445576178@github.com>

Received on Wednesday, 30 October 2024 00:39:57 UTC