Cleanup events in Backbone subviews
CoffeeScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
spec
.gitignore
.hsdoc
Gruntfile.coffee
LICENSE
README.md
eventJanitor.coffee
eventJanitor.js
eventJanitor.min.js
package.json

README.md

Mixen View Event Janitor

A class which you can use with Mixen to cleanup events when you destroy Backbone subviews.

Usage

class MyView extends Mixen(EventJanitor, Backbone.View)
  render: ->
    subview = new OtherAwesomeView()

    @rememberView subview

When undelegateEvents gets called on the view, it will call stopListening on all the registered subviews.