Class ToggleEvent
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The ToggleEvent interface represents an event that fires when a popover element is toggled between being shown and hidden.
[Value("ToggleEvent")]
public class ToggleEvent : Event
- Inheritance
-
ToggleEvent
- Inherited Members
Remarks
This is the event object for the HTMLElement.Beforetoggle and HTMLElement.Toggle events, which fire on elements as follows:
Constructors
ToggleEvent()
public ToggleEvent()
ToggleEvent(string, ToggleEventInit)
The ToggleEvent() constructor creates a new ToggleEvent object.
public ToggleEvent(string type, ToggleEventInit eventInitDict = null)
Parameters
typestringeventInitDictToggleEventInit
Remarks
Properties
NewState
The newState read-only property of the ToggleEvent interface is a string representing the state the element is transitioning to.
[Value("newState")]
public string NewState { get; }
Property Value
- string
A string. Possible values are
"open"(the popover is being shown) or"closed"(the popover is being hidden).
Remarks
OldState
The oldState read-only property of the ToggleEvent interface is a string representing the state the element is transitioning from.
[Value("oldState")]
public string OldState { get; }
Property Value
- string
A string. Possible values are
"open"(the popover is going from showing to hidden) or"closed"(the popover going from hidden to shown).