ToggleEvent

open class ToggleEvent(val type: EventType<ToggleEvent>, init: ToggleEventInit = definedExternally) : Event(source)

The ToggleEvent interface represents an event that fires when a popover element is toggled between being shown and hidden.

MDN Reference

Constructors

Link copied to clipboard
constructor(type: EventType<ToggleEvent>, init: ToggleEventInit = definedExternally)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
external val bubbles: Boolean
Link copied to clipboard
external val cancelable: Boolean
Link copied to clipboard
external val composed: Boolean
Link copied to clipboard
external val currentTarget: EventTarget?
Link copied to clipboard
Link copied to clipboard
external val eventPhase: EventPhase
Link copied to clipboard
external val isTrusted: Boolean
Link copied to clipboard
external val newState: ToggleState

The newState read-only property of the ToggleEvent interface is a string representing the state the element is transitioning to.

Link copied to clipboard
external val oldState: ToggleState

The oldState read-only property of the ToggleEvent interface is a string representing the state the element is transitioning from.

Link copied to clipboard
external val source: Element?

The source read-only property of the ToggleEvent interface is an Element object instance representing the HTML popover control element that initiated the toggle.

Link copied to clipboard
external val target: EventTarget?
Link copied to clipboard
Link copied to clipboard
open external override val type: EventType<ToggleEvent>

Functions

Link copied to clipboard
Link copied to clipboard
external fun preventDefault()
Link copied to clipboard
Link copied to clipboard
external fun stopPropagation()