fabricjs Fabricjs canvas events

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


  1. on(eventName, handler) - Attaches an event listener with a callback to the object.

  2. off(eventName, handler) - Remove the event listener from the object. Calling this function witout any arguments will remove all event listeners on the object.

  3. trigger(eventName, optionsopt) - Fires the event and optional options object.


eventNameThe name of the event you want to subscribe such as 'object:moving'
eventHandlerThe function you want to execute when that particluar event is triggered
optionsoptOptions object


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

Got any fabricjs Question?