Class: EventEmitter

PhotoEditorSDK. EventEmitter

Receives and emits events

new PhotoEditorSDK.EventEmitter()

sdk/lib/event-emitter.js, line 14

Creates an EventEmitter

Methods

emit(type)

sdk/lib/event-emitter.js, line 119

Emits an event with the given type and arguments

Name Type Description
type String
...args *

off(type)

sdk/lib/event-emitter.js, line 89

Removes the given listener from the given type of events

Name Type Description
type String
...args *

on(type, listener)

sdk/lib/event-emitter.js, line 49

Adds the given listener to the given type of events

Name Type Description
type String
listener function

once(type, listener)

sdk/lib/event-emitter.js, line 75

Adds the given listener to the given type of events and removes it once it has been triggered

Name Type Description
type String
listener function

pipeEvents(destination)

sdk/lib/event-emitter.js, line 28

Pipes all events to the given EventEmitter

Name Type Description
destination EventEmitter

setMaxListeners(newMaxListeners)

sdk/lib/event-emitter.js, line 138

Sets the maximum amonut of listeners before a warning is printed

Name Type Description
newMaxListeners Number

unpipeEvents(destination)

sdk/lib/event-emitter.js, line 36

Stops piping events to the given EventEmitter

Name Type Description
destination EventEmitter