npm.io
0.1.0 • Published 13 years ago

mixen-view-eventjanitor

Licence
MIT
Version
0.1.0
Deps
2
Vulns
0
Weekly
0

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.

Keywords