node package manager


Backbone.View events which bubble

Backbone.ViewEvents — an alternative Events implementation for the Backbone.View which provides events which bubble up through a view hierarchy while the latter is inferred from DOM and the views' position in it.


{View} = require 'backbone.viewevents'

parent = new View().render() child = new View().render()


register listener on parent

parent.on 'someevent', (msg) -> console.log('caught!', msg)

trigger event on child

child.trigger('someevent', 'hello')