ToggleEvent Class
https://html.spec.whatwg.org/multipage/interaction.html#toggleevent
public sealed class ToggleEvent : Event- Inheritance
EventToggleEvent
Constructors
| Name | Description |
|---|---|
| ToggleEvent(string, ToggleEventInit?) | Creates a toggle event with the given type and initialization dictionary. |
ToggleEvent(string, ToggleEventInit?)
HtmlEvents.csCreates a toggle event with the given type and initialization dictionary.
public ToggleEvent(string type, ToggleEventInit? eventInitDict = null)Properties
| Name | Description |
|---|---|
| NewState | Gets the state of the element after the toggle. |
| OldState | Gets the state of the element before the toggle. |
| Source | https://html.spec.whatwg.org/multipage/interaction.html#dom-toggleevent-source: the source retargeted against the current target. |
NewState
HtmlEvents.csGets the state of the element after the toggle.
public string NewState { get; }Property value
See also
OldState
HtmlEvents.csGets the state of the element before the toggle.
public string OldState { get; }Property value
See also
Source
HtmlEvents.cshttps://html.spec.whatwg.org/multipage/interaction.html#dom-toggleevent-source: the source retargeted against the current target.
public Element? Source { get; }