EventTargetExtensions
A set of extensions for EventTarget objects.
public static Task<Event> AwaitEventAsync<TEventTarget>(this TEventTarget node, string eventName) where TEventTarget : IEventTarget
Returns a task that is completed once the event is fired.
Fires a trusted event with the provided event data.
public static bool Fire<T>(this IEventTarget target, Action<T> initializer, IEventTarget targetOverride = null) where T : Event
Firing an event means dispatching the initialized (and trusted)
event at the specified event target.
public static bool FireSimpleEvent(this IEventTarget target, string eventName, bool bubble = false, bool cancelable = false)
Firing a simple event means that a trusted event with a name, which
does not bubble, is not cancelable and which uses the Event
interface. It is created and dispatched at the given target.