Sys.UI.DomEvent.$addHandlers Method

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

$addHandlers(element, events, handlerOwner, autoRemove);

Term

Definition

element

The DOM element that exposes the event.

events

A dictionary of events and their handlers.

handlerOwner

(Optional) The object instance that is the context for the delegates that should be created from the handlers.

autoRemove

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

Exception type

Condition

Error.invalidOperation Function

(Debug) One of the handlers in events is not a function.

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

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

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