Sys.UI.DomEvent $addHandler Method

Provides a shortcut to the addHandler method of the Sys.UI.DomEvent class. This member is static and can be invoked without creating an instance of the class.

$addHandler(element, eventName, handler, autoRemove);

Term

Definition

element

The DOM element that exposes the event.

eventName

The name of the event.

handler

The event handler to add.

autoRemove

(Optional) A boolean value that determines whether the handler should be removed automatically when the element is disposed.

For details about the method that this shortcut represents, see Sys.UI.DomEvent addHandler Method.

The following example shows how to associate an event handler with an element by using the $addHandler shortcut method.

No code example is currently available or this language may not be supported.
Show: