Event listening

To attach an event listener to an element in fig, simply set its @event attribute to a listener, where event is the name of the event you'd like to listen to.

app.js
Component.fig

A list of all available event names can be found on MDN.