EventTarget Class
https://dom.spec.whatwg.org/#interface-eventtarget
public class EventTargetConstructors
| Name | Description |
|---|---|
| EventTarget() | Creates an event target. |
EventTarget()
EventTarget.csCreates an event target.
public EventTarget()Methods
| Name | Description |
|---|---|
| AddEventListener(string, IEventListener?, AddEventListenerOptions?) | Registers the listener for events of the given type with the given options. |
| AddEventListener(string, IEventListener?, bool) | Registers the listener for events of the given type, in the capture phase when useCapture is true. |
| AddEventListener(string, Action<Event>?, AddEventListenerOptions?) | Registers the delegate as a listener for events of the given type with the given options. |
| AddEventListener(string, Action<Event>?, bool) | Registers the delegate as a listener for events of the given type, in the capture phase when useCapture is true. |
| DispatchEvent(Event) | https://dom.spec.whatwg.org/#dom-eventtarget-dispatchevent |
| RemoveEventListener(string, IEventListener?, EventListenerOptions?) | Removes the listener registered for events of the given type and capture setting. |
| RemoveEventListener(string, IEventListener?, bool) | Removes the listener registered for events of the given type and capture setting. |
| RemoveEventListener(string, Action<Event>?, EventListenerOptions?) | Removes the delegate registered as a listener for events of the given type and capture setting. |
| RemoveEventListener(string, Action<Event>?, bool) | Removes the delegate registered as a listener for events of the given type and capture setting. |
AddEventListener overloads
AddEventListener(string, IEventListener?, AddEventListenerOptions?)
EventTarget.csRegisters the listener for events of the given type with the given options.
public void AddEventListener(string type, IEventListener? callback, AddEventListenerOptions? options = null)AddEventListener(string, IEventListener?, bool)
EventTarget.csRegisters the listener for events of the given type, in the capture phase when useCapture is true.
public void AddEventListener(string type, IEventListener? callback, bool useCapture)AddEventListener(string, Action<Event>?, AddEventListenerOptions?)
EventTarget.csRegisters the delegate as a listener for events of the given type with the given options.
public void AddEventListener(string type, Action<Event>? callback, AddEventListenerOptions? options = null)Parameters
typestringcallbackAction<Event>?optionsAddEventListenerOptions?
AddEventListener(string, Action<Event>?, bool)
EventTarget.csDispatchEvent(Event)
EventTarget.cshttps://dom.spec.whatwg.org/#dom-eventtarget-dispatchevent
RemoveEventListener overloads
RemoveEventListener(string, IEventListener?, EventListenerOptions?)
EventTarget.csRemoves the listener registered for events of the given type and capture setting.
public void RemoveEventListener(string type, IEventListener? callback, EventListenerOptions? options = null)RemoveEventListener(string, IEventListener?, bool)
EventTarget.csRemoves the listener registered for events of the given type and capture setting.
public void RemoveEventListener(string type, IEventListener? callback, bool useCapture)RemoveEventListener(string, Action<Event>?, EventListenerOptions?)
EventTarget.csRemoves the delegate registered as a listener for events of the given type and capture setting.
public void RemoveEventListener(string type, Action<Event>? callback, EventListenerOptions? options = null)Parameters
typestringcallbackAction<Event>?optionsEventListenerOptions?