← Back to release summary

ToggleEvent source attribute

Category
DOM
Type
Chromium catches up
Status
Proposed (Chrome Proposed)
Intent stage
None

WPT details: https://wpt.fyi/results/html/semantics/popovers/popover-toggle-source.html https://wpt.fyi/results/html/semantics/interactive-elements/the-dialog-element/dialog-toggle-source.html https://wpt.fyi/results/html/semantics/interactive-elements/the-details-element/details-toggle-source.html

Summary

The source attribute of ToggleEvents contains the element which triggered the ToggleEvent to be fired, if applicable. For example, if a button element with the popovertarget or commandfor attribute set up to open a popover is clicked by the user, then the ToggleEvent fired on the popover will have its source attribute set to the invoking button.

Standards & signals

Ecosystem

View on chromestatus.com