Skip to content
Titanium SDK
Version12.8.0

You are reading 12.8.0. See this page in 13.4.1.

events

pseudoAndroidiPhoneiPadmacOSsince 8.1.0

A Node.js-compatible implementation of the core events module

Titanium provides a number of shims and ports of core Node.js module functionality.

This module is intended to provide a Node-compatible port of the events.

More details on the Node.js API can be found in their events module documentation

Properties 2

The default number of maximum listeners for all EventEmitters

Default: 10

The EventEmitter class is defined and exposed by the events module:

const EventEmitter = require('events');

All EventEmitters emit the event 'newListener' when new listeners are added and 'removeListener' when existing listeners are removed.

Methods 1

A class method that returns the number of listeners for the given eventName registered on the given emitter.

Parameters
ParametersTypeDescription
emitterEventEmitter

The emitter to query

eventNameString

The event name

Returns Number