Intent to Ship: Dialog Toggle Events

372 views
Skip to first unread message

Chromestatus

unread,
Oct 16, 2024, 12:30:41 PMOct 16
to blin...@chromium.org, chro...@keithcirkel.co.uk, keit...@github.com

Contact emails

keit...@github.com, chro...@keithcirkel.co.uk

Explainer

None

Specification

https://github.com/whatwg/html/issues/9733

Summary

It is useful for web authors do determine when their <dialog> elements open and close. popover already has `ToggleEvent` which is dispatched when a popover opens or closes, but <dialog> does not. The current way to detect when a <dialog> opens is to register a mutation observer to check for open, however, this is quite a lot of work where an event would be easier. This change incorporates the same `ToggleEvent`s that popovers dispatch, but for `<dialog>` elements: when `showModal` or `show` is called, <dialog> dispatches a ToggleEvent with newState=open. When a dialog is closed (via form or button or closewatcher) it should dispatch a ToggleEvent with newState=closed.



Blink component

Blink>DOM

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None



Gecko: Shipped/Shipping (https://github.com/mozilla/standards-positions/issues/1101)

WebKit: No signal

Web developers: No signals (https://github.com/WebKit/standards-positions/issues/418)

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

No

Is this feature fully tested by web-platform-tests?

Yes

Flag name on chrome://flags

None

Finch feature name

None

Non-finch justification

None

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1521813

Estimated milestones

No milestones specified



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5078613609938944?gate=5166222923268096

This intent message was generated by Chrome Platform Status.

Joey Arhar

unread,
Oct 16, 2024, 12:36:02 PMOct 16
to Chromestatus, blin...@chromium.org, chro...@keithcirkel.co.uk, keit...@github.com
Thanks Keith, this looks great! I am supportive.


I anticipate the shipping milestone would be M132 if we get approval here. Want to update the chromestatus entry?

The RuntimeEnabledFeature flag name is DialogElementToggleEvents.

> Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
> No

This will be supported on all blink platforms. Want to update the chromestatus entry?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/670fea20.2b0a0220.137ef7.0d39.GAE%40google.com.

Keith Cirkel

unread,
Oct 16, 2024, 1:01:30 PMOct 16
to Joey Arhar, Chromestatus, blin...@chromium.org, keithamus
Thanks for catching those Joey, all fixed!

Alex Russell

unread,
Oct 17, 2024, 12:09:47 AMOct 17
to blink-dev, Keith Cirkel, blin...@chromium.org, keit...@github.com, Joey Arhar, Chromestatus
Why was TAG Review skipped?

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Keith Cirkel

unread,
Oct 17, 2024, 2:53:47 AMOct 17
to Alex Russell, blink-dev, keithamus, Joey Arhar, Chromestatus
It seemed unnecessary given these are the same events that popovers and details elements use, just applied to dialogs.  I’m happy to submit it to TAG for review if you think otherwise.  

Jeffrey Yasskin

unread,
Oct 17, 2024, 3:44:38 AMOct 17
to Keith Cirkel, Alex Russell, blink-dev, keithamus, Joey Arhar, Chromestatus
It very nearly falls into the first exception at https://www.chromium.org/blink/guidelines/api-owners/process-exceptions/ since it's shipping in Firefox nightly, and https://github.com/whatwg/html/pull/10091 looks close to merging.

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/9a827257-6867-4f4a-8415-9df415973aec%40app.fastmail.com.

Keith Cirkel

unread,
Oct 17, 2024, 4:25:25 AMOct 17
to Jeffrey Yasskin, Alex Russell, blink-dev, keithamus, Joey Arhar, Chromestatus
I've filed for a TAG review here: https://github.com/w3ctag/design-reviews/issues/1005 for completeness.

Yoav Weiss (@Shopify)

unread,
Oct 23, 2024, 11:19:46 AMOct 23
to blink-dev, Keith Cirkel, Alex Russell, blink-dev, keit...@github.com, Joey Arhar, Chromestatus, Jeffrey Yasskin
LGTM1

Thanks for catching us up here! :)

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Alex Russell

unread,
Oct 23, 2024, 11:22:55 AMOct 23
to blink-dev, Yoav Weiss, Keith Cirkel, Alex Russell, blink-dev, keit...@github.com, Joey Arhar, Chromestatus, Jeffrey Yasskin
Thanks for sending the FYI. LGTM2

Vladimir Levin

unread,
Oct 23, 2024, 11:33:28 AMOct 23
to Alex Russell, blink-dev, Yoav Weiss, Keith Cirkel, keit...@github.com, Joey Arhar, Chromestatus, Jeffrey Yasskin
LGTM3

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/e575ad19-3202-4594-adfb-1e364ba29710n%40chromium.org.
Reply all
Reply to author
Forward
0 new messages