documentcloud/backbone — pull request #1110 by braddunbar (2012-03-17 13:13:59+00:00)
Title: Fix #1105 - Add convenience overloads for `off`.

When cleaning up handlers for a particular object, it would be nice to remove all handlers for a particular context or callback. The same is true for callbacks. In effect, passing a null value as the `events` argument will represent "all events" just like passing null for `context` or `callback`. It's been suggested that `offAll` or similar would be better but I think this is fairly intuitive and keeps the api nice and clean.

```javascript
this.model.on('x', this.x, this);
this.model.on('y', this.y, this);
// clean up all handlers
this.model.off(null, null, this);
```