flâneur — a map of the web's best reading

HTMLElement: toggle event - Web APIs | MDN

developer.mozilla.org · 439 words · saved by 1 readers

The toggle event of the HTMLElement interface fires on a popover element (i.e. one that has a valid popover attribute) just after it is shown or hidden. Note: The toggle event behaves differently when fired on elements. In this case, it does not relate to popovers, and instead fires when the open/closed state of a element is toggled. See the HTMLDetailsElement toggle event page for more information. Use the event name in methods like addEventListener(), or set an event handler property. A ToggleEvent. Inherits from Event. It is worth pointing out that toggle events are coalesced, meaning that if multiple toggle events are fired before the event loop has a chance to cycle, only a single event will be fired. For example: Tip: you can click/tap on a cell for more information. This page was last modified on Jul 25, 2024 by MDN contributors. Your blueprint for a better internet. Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation. Portions of this c

HTMLElement: toggle event - Web APIs | MDN Skip to main content Skip to search HTMLElement: toggle event Baseline Widely available * This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020. * Some parts of this feature may have varying levels of support. Learn more See full compatibility The toggle event of the HTMLElement interface fires on a popover element, <dialog> element, or <details> element just after it is shown or hidden. If the element is transitioning from hidden to showing, the event.oldState prope

Explore this link on the map →

related reading