twitter/flight — pull request #99 by versioncontrol (2013-04-10 15:54:48+00:00)
Title: Namespaced event types on global listeners

See Issue #98:

Taken this function:
```javascript
this.on( document, 'resize', this.resize )
```

Then:
```javascript
this.teardown() or this.off( document, 'resize', this.resize )
```

Will not just remove the instance's listener, but all of the component instance's listeners.

The easiest solution is to namespace the event type:

```javascript
this.on( document, 'resize' + '.' + this.identity, this.resize )
```
and
```javascript
this.off( document, 'resize' + '.' + this.identity, this.resize )
```

But it is also possible to add the namespace automatically when set.