IEventGroup

A group of event listeners.

Constructor | Methods

Constructor

IEventGroup()

Methods

Name

Returns

Description

add(types, callback[, context[, priority]])

IEventGroup

Adds an event listener.

remove(types, callback[, context[, priority]])

IEventGroup

Deletes an event listener from the group.

removeAll()

IEventGroup

Deletes all event listeners from the group.

Methods details

add

{IEventGroup} add(types, callback[, context[, priority]])

Adds an event listener.

Returns self-reference.

Parameters:

Parameter

Default value

Description

types*

—

Type: String|String[]

Type or array of types for the event.

callback*

—

Type: Function

Handler function. The event object is passed to the function as a parameter.

context

—

Type: Object

Context for the handler function.

priority

0

Type: Integer

Subscription priority.

* Mandatory parameter/option.

remove

{IEventGroup} remove(types, callback[, context[, priority]])

Deletes an event listener from the group.

Returns self-reference.

Parameters:

Parameter

Default value

Description

types*

—

Type: String|String[]

Type or array of types for the events.

callback*

—

Type: Function

Handler function. The event object is passed to the function as a parameter.

context

—

Type: Object

Context for the handler function.

priority

0

Type: Integer

Subscription priority.

* Mandatory parameter/option.

removeAll

{IEventGroup} removeAll()

Deletes all event listeners from the group.

Returns self-reference.