on(eventName, handler) - Attaches an event listener with a callback to the object.
off(eventName, handler) - Remove the event listener from the object. Calling this function witout any arguments will remove all event listeners on the object.
trigger(eventName, optionsopt) - Fires the event and optional options object.
|The name of the event you want to subscribe such as 'object:moving'|
|The function you want to execute when that particluar event is triggered|
Fabric supports a number of events to allow for interactivity and extensibility. In order to subscribe to events for a canvas use the
on method the way its used in jQuery. And you wish to manually trigger any event use the
trigger method. All the events are within the scope of a particular canvas instance. Visit Link for more information on events