(ctor)
| 8000 | // Add on and off methods to a constructor's prototype, to make |
| 8001 | // registering events on such objects more convenient. |
| 8002 | function eventMixin(ctor) { |
| 8003 | ctor.prototype.on = function(type, f) {on(this, type, f);}; |
| 8004 | ctor.prototype.off = function(type, f) {off(this, type, f);}; |
| 8005 | } |
| 8006 | |
| 8007 | // MISC UTILITIES |
| 8008 |