Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

export EventEmitter properly

  • Loading branch information...
commit c43611b808b36fae689d5a2f090ee7b22c8c3f63 1 parent e34f4cd
@rsms authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/runtime/runtime_events.mv
View
8 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
}
Please sign in to comment.
Something went wrong with that request. Please try again.