ToggleEvent
The ToggleEvent
interface represents an event notifying the user of an element whose state toggles between being open or closed.
Constructor
ToggleEvent()
-
Creates an
ToggleEvent
object.
Instance properties
This interface inherits properties from its parents, UIEvent
and Event
.
ToggleEvent.oldState
Read only-
Returns either
open
orclosed
, depending on which state the element is transitioning from. ToggleEvent.newState
Read only-
Returns either
open
orclosed
, depending on which state the element is transitioning to.
Specifications
No specification found
No specification data found for api.ToggleEvent
.
Check for problems with this page or contribute a missing spec_url
to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.
Browser compatibility
BCD tables only load in the browser
See also
beforetoggle
eventtoggle
event- The
popover
attribute