Module gamejs/utils/callback

Manage a callback with invocation scope. This is used internally by GameJs but might be useful for others.

Class Callback

Instance Methods

Instance Properties


Callback (callback, scope)

Parameters

Function callback
Object scope with which the callback will be triggered

Callback.prototype.fn


Callback.prototype.fnScope


Callback.prototype.trigger ()

Any arguments passed to trigger will be passed to the callback.