Skip to content

Conversation

@tunetheweb
Copy link
Contributor

Fixes #3604

Has quite different support than the rest of Toggle Event so added it as a new feature:

image

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Dec 5, 2025
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for starting this, @tunetheweb!

@@ -0,0 +1,6 @@
name: Popover ToggleEvent source
Copy link
Collaborator

@ddbeck ddbeck Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, the toggle event fires for <details>, <dialog>, and popovers. But I'm not sure how to understand the spec with the source property. Is the property only for popovers? I think the answer to this makes a big difference for how we frame this feature.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking on this a little more, can you point to an example of how this might be used? The MDN reference page example feels a little contrived and I'm trying to figure out what a developer might do with this that they could not without this property.

Copy link
Contributor Author

@tunetheweb tunetheweb Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, the toggle event fires for <details>, <dialog>, and popovers. But I'm not sure how to understand the spec with the source property. Is the property only for popovers? I think the answer to this makes a big difference for how we frame this feature.

Oh you're right it's for more than just Popovers (though that's a big use case). Updated to drop the "Popover" from the feature name.

And here's an example of how it might be used:
https://chrome.dev/css-wrapped-2025/#toggleevent-source
(which coincidently is why we want to add this feature so we can add a nice Baseline widget to this page 😁)

@tunetheweb tunetheweb changed the title Add Popover ToggleEvent source Add ToggleEvent source Dec 8, 2025
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the link to the Wrapped page—something about the "responsible" element cleared this up for me. Some little things to fix (most importantly, this feature's ID), but this is close to merging. Thank you!

Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@ddbeck ddbeck merged commit 66f90a4 into web-platform-dx:main Dec 8, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature definition Creating or defining new features or groups of features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ToggleEvent source

2 participants