drhayes/impactjs-eventchain — pull request #4 by smrq (2013-03-31 08:33:22+00:00)
Title: Mixins for user-defined event handler things

I wanted to be able to do something like
```javascript
EventChain(this).forever().orUntil(...)
```
And then I figured, instead of adding **forever** to EventChain, why not make it mixin-friendly, a la underscore.js? This change enabled me to add my own event handler in this way:
```javascript
EventChain.mixin('forever', function(context, steps) {
return function() {
steps.push(function() {});
return this;
};
});
```
I went ahead and converted all the existing handlers into mixins.

I think this is a pretty useful feature to have. EventChain has a lot of great functionality already, but being able to extend it further is awesome imo.