CustomEvent Class

https://dom.spec.whatwg.org/#interface-customevent

public sealed class CustomEvent : Event
Inheritance
Event CustomEvent

Constructors

NameDescription
CustomEvent(string, CustomEventInit?)Creates a custom event with the given type and initialization dictionary.

CustomEvent(string, CustomEventInit?)

Event.cs

Creates a custom event with the given type and initialization dictionary.

public CustomEvent(string type, CustomEventInit? eventInitDict = null)

Properties

NameDescription
DetailGets the custom data associated with the event.

Detail

Event.cs

Gets the custom data associated with the event.

public object? Detail { get; }

Methods

NameDescription
InitCustomEvent(string, bool, bool, object?)https://dom.spec.whatwg.org/#dom-customevent-initcustomevent

InitCustomEvent(string, bool, bool, object?)

Event.cs

https://dom.spec.whatwg.org/#dom-customevent-initcustomevent

public void InitCustomEvent(string type, bool bubbles = false, bool cancelable = false, object? detail = null)