Class ToggleEvent
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The ToggleEvent interface represents an event notifying the user an Element's state has changed.
[Value("ToggleEvent")]
public class ToggleEvent : Event
- Inheritance
-
ToggleEvent
- Inherited Members
Remarks
This is the event object for the HTMLElement HTMLElement.Beforetoggle and HTMLElement.Toggle events, which fire on some elements just before and just after they transition between showing and hidden, respectively.
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).