Table of Contents

Interface IEventTarget

Namespace
SharpVectors.Dom.Events
Assembly
SharpVectors.Core.dll

The IEventTarget interface is implemented by all the objects which could be event targets in an implementation which supports the Event flows.

public interface IEventTarget

Remarks

The interface allows registration, removal or query of event listeners, and dispatch of events to an event target.

When used with DOM event flow, this interface is implemented by all target nodes and target ancestors, i.e. all DOM INodes of the tree support this interface when the implementation conforms to DOM Level 3 Events and, therefore, this interface can be obtained by using binding-specific casting methods on an instance of the Node interface.

Invoking multiple times AddEventListener or AddEventListenerNs on the same IEventTarget with the same parameters (namespaceUri, type, listener, and useCapture) is considered to be a no-op and thus independently of the event group. They do not cause the EventListener to be called more than once and do not cause a change in the triggering order. In order to guarantee that an event listener will be added to the event target for the specified event group, one needs to invoke RemoveEventListener or RemoveEventListenerNs first.

Methods

AddEventListener(string, EventListener, bool)

This method allows the registration of an event listener in the default group and, depending on the useCapture parameter, on the capture phase of the DOM event flow or its target and bubbling phases. https://www.w3.org/TR/SVG/interact.html#SVGEvents

AddEventListenerNs(string, string, EventListener, bool, object)

This method allows the registration of an event listener in a specified group or the default group and, depending on the useCapture parameter, on the capture phase of the DOM event flow or its target and bubbling phases.

DispatchEvent(IEvent)

This method allows the dispatch of events into the implementation's event model.

HasEventListenerNs(string, string)

This method allows the DOM application to know if this IEventTarget contains an event listener registered for the specified event type.

RemoveEventListener(string, EventListener, bool)

This method allows the removal of event listeners from the default group.

RemoveEventListenerNs(string, string, EventListener, bool)

This method allows the removal of event listeners from a specified group or the default group.

WillTriggerNs(string, string)

This method allows the DOM application to know if an event listener, attached to this IEventTarget or one of its ancestors, will be triggered by the specified event type during the dispatch of the event to this event target or one of its descendants.