UIEvent Class

https://w3c.github.io/uievents/#uievent

public class UIEvent : Event
Inheritance
Event UIEvent

Constructors

NameDescription
UIEvent(string, UIEventInit?)Creates a UI event of the given type with the given initialization dictionary.

UIEvent(string, UIEventInit?)

UIEvents.cs

Creates a UI event of the given type with the given initialization dictionary.

public UIEvent(string type, UIEventInit? eventInitDict = null)

Properties

NameDescription
DetailGets the detail of the event, whose meaning depends on the event type (for example the click count).
PseudoTargetGets the pseudo-element that is the target of the interaction (https://github.com/w3c/uievents/pull/413): null when the target is not a pseudo-element, outside of the dispatch, and for the listeners of a shadow tree the originating element is retargeted out of (the pseudo-element is in the tree of its originating element).
ViewGets the window in which the event occurred, or null.
WhichGets the legacy numeric code of the key or button of the event.

Gets the detail of the event, whose meaning depends on the event type (for example the click count).

public int Detail { get; }

PseudoTarget

UIEvents.cs
  • Experimental (WEBPLATEXP0008)

Gets the pseudo-element that is the target of the interaction (https://github.com/w3c/uievents/pull/413): null when the target is not a pseudo-element, outside of the dispatch, and for the listeners of a shadow tree the originating element is retargeted out of (the pseudo-element is in the tree of its originating element).

[Experimental("WEBPLATEXP0008", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public CssPseudoElement? PseudoTarget { get; }

Gets the window in which the event occurred, or null.

public EventTarget? View { get; }

Gets the legacy numeric code of the key or button of the event.

public uint Which { get; }

Methods

NameDescription
InitUIEvent(string, bool, bool, EventTarget?, int)https://w3c.github.io/uievents/#dom-uievent-inituievent

InitUIEvent(string, bool, bool, EventTarget?, int)

UIEvents.cs

https://w3c.github.io/uievents/#dom-uievent-inituievent

public void InitUIEvent(string typeArg, bool bubblesArg = false, bool cancelableArg = false, EventTarget? viewArg = null, int detailArg = 0)

Parameters

typeArg string
bubblesArg bool
cancelableArg bool
viewArg EventTarget?
detailArg int

See also