Home Reference Source
public class | source

Events

You can directly use an instance of this class. events

Internal event system, based on EventEmitter2.

Constructor Summary

Public Constructor
public

constructor(e: *)

Member Summary

Public Members
public

events: *

Method Summary

Public Methods
public

emit(evt: string, params: ...mixed): *

Emit event with given properties

public

listen(evt: string, callback: Function): *

Listen to event

public

unlisten(evt: string, callback: Function): *

Stop listening to event callback

Public Constructors

public constructor(e: *) source

Params:

NameTypeAttributeDescription
e *

Public Members

public events: * source

Public Methods

public emit(evt: string, params: ...mixed): * source

Emit event with given properties

Params:

NameTypeAttributeDescription
evt string

Event

params ...mixed

Any necessary params

Return:

*

public listen(evt: string, callback: Function): * source

Listen to event

Params:

NameTypeAttributeDescription
evt string

Event

callback Function

Callback

Return:

*

public unlisten(evt: string, callback: Function): * source

Stop listening to event callback

Params:

NameTypeAttributeDescription
evt string

Event

callback Function

Callback

Return:

*