The CSSWG recently resolved to add :open and :closed pseudo classes. These will apply to anything that can open/close, which includes <dialog>, <details>, and <select>, and also the pop-up API (see DOM and html PRs). For the pop-up API, there is a need for events that fire when these states change. In OpenUI, we recently discussed the naming for these events, and resolved that we'd prefer to make this a more general set of events that should apply to anything that can be "open"/"closed".
For the pop-up API, there is only the need for events that happen before the state changes, and interestingly only the "opening" event is cancelable. However, in the general case, it would seem that we should add four events, two for before/after the state changes to "open" and two for "closed".
Thoughts? Are there precedents, suggestions, or requirements for the naming of these four events?
The CSSWG recently resolved to add
:openand:closedpseudo classes. These will apply to anything that can open/close, which includes<dialog>,<details>, and<select>, and also the pop-up API (see DOM and html PRs). For the pop-up API, there is a need for events that fire when these states change. In OpenUI, we recently discussed the naming for these events, and resolved that we'd prefer to make this a more general set of events that should apply to anything that can be "open"/"closed".For the pop-up API, there is only the need for events that happen before the state changes, and interestingly only the "opening" event is cancelable. However, in the general case, it would seem that we should add four events, two for before/after the state changes to "open" and two for "closed".
Thoughts? Are there precedents, suggestions, or requirements for the naming of these four events?