If I'm building my own components, is there a way that they can emit custom events?If so does someone have a best practices example for defining and throwing custom events ?
class GermansUnit extends Framer.EventEmitter constructor: () -> setInterval @doEmit, 1000 doEmit: () => @emit "some-event"
unit = new GermansUnitunit.on "some-event", -> print("Hey Hey")
http://share.framerjs.com/1jk09bsafv9j/
Thanks Mike, much appreciated!
3 Comments