Permalink
Browse files

export EventEmitter properly

  • Loading branch information...
1 parent e34f4cd commit c43611b808b36fae689d5a2f090ee7b22c8c3f63 @rsms committed Oct 14, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/runtime/runtime_events.mv
@@ -1,5 +1,5 @@
-export EventEmitter = class {
+EventEmitter = exports.EventEmitter = class {
on: ^(event, invoke) {
if (!@eventListeners) {
Object.defineProperty this, 'eventListeners', {value:{}}
@@ -21,7 +21,7 @@ export EventEmitter = class {
}
},
- removeListener: ^(event, callback) {
+ removeEventListener: ^(event, callback) {
if (@eventListeners) {
if (callback && (listeners = @eventListeners[event])) {
i = listeners.indexOf callback
@@ -33,6 +33,6 @@ export EventEmitter = class {
}
}
-EventEmitter.enableFor = ^(object) {
- extend object, EventEmitter.prototype
+exports.EventEmitter.enableFor = ^(object) {
+ extend object, exports.EventEmitter.prototype
}

0 comments on commit c43611b

Please sign in to comment.