Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 899 Bytes

sip.js.emitter.addlistener.md

File metadata and controls

27 lines (17 loc) · 899 Bytes

Home > sip.js > Emitter > addListener

Emitter.addListener() method

Sets up a function that will be called whenever the target changes.

Signature:

addListener(listener: (data: T) => void, options?: {
        once?: boolean;
    }): void;

Parameters

Parameter Type Description
listener (data: T) => void Callback function.
options { once?: boolean; } An options object that specifies characteristics about the listener. If once true, indicates that the listener should be invoked at most once after being added. If once true, the listener would be automatically removed when invoked.

Returns:

void