Skip to content

Add beforeopen, afteropen, beforeclosed, and afterclosed events? #8386

@mfreed7

Description

@mfreed7

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: popoverThe popover attribute and friends

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions