Share via


Sys.EventHandlerList Constructor

Initializes a new instance of the EventHandlerList class.

var e = new Sys.EventHandlerList();

Remarks

The EventHandlerList constructor creates a new instance of the EventHandlerList class, which is a dictionary to hold events and their handlers.

Every ASP.NET AJAX component and application already contains an EventHandlerList instance in its events property, so you usually do not have to use this constructor directly.

To access the EventHandlerList instance associated with the current component or application, call this.get_events(), as shown in the following example:

_clickHandler: function(event) {
    var h = this.get_events().getHandler('click');
    if (h) h(this, Sys.EventArgs.Empty);
},

This example is part of a larger example from the EventHandlerList class overview.

See Also

Reference

Sys.EventHandlerList Class

new Operator

Other Resources

Language Reference