Home > @gglib/utils > Events

Events class

Base class with an event system


export declare class Events 


Implements logic for binding and unbinding methods to and from events. The code is taken from the Backbone project


Method Modifiers Description
off(name, callback, context) Remove one or many callbacks.
on(name, callback, context) Bind an event to a callback function.
once(name, callback, context) Bind an event to only be triggered a single time.
trigger(name, args) Trigger one or many events, firing all bound callbacks.