event.Group
Extends IEventGroup.
A group of event listeners.
Constructor | Fields | Methods
Constructor
event.Group(events)
Creates a group of event listeners.
Parameters:
Parameter |
Default value |
Description |
— |
Type: IEventManager The event manager that the group was created for. |
* Mandatory parameter/option.
Example:
// Creating a group of event listeners.
var listeners = events.group()
.add('click', function () {
alert('click');
})
.add('dblclick', function () {
alert('dblclick');
});
// ...
// When the event handlers stored in the container
// are no longer needed, we simply clear the group.
listeners.removeAll();
Fields
Name |
Type |
Description |
The event manager that the group was created for. |
Methods
Name |
Returns |
Description |
Adds an event listener. Inherited from IEventGroup. |
||
Integer |
Returns the current number of subscribers in the group. |
|
Deletes an event listener from the group. Inherited from IEventGroup. |
||
Deletes all event listeners from the group. Inherited from IEventGroup. |
Fields details
events
{IEventManager} events
The event manager that the group was created for.
Methods details
getLength
{Integer} getLength()
Returns the current number of subscribers in the group.
Mandatory parameter/option.