Index: ext/common.js |
=================================================================== |
--- a/ext/common.js |
+++ b/ext/common.js |
@@ -34,16 +34,17 @@ |
{ |
var idx = this._listeners.indexOf(listener); |
if (idx != -1) |
this._listeners.splice(idx, 1); |
}, |
_dispatch: function() |
{ |
var results = []; |
+ var listeners = this._listeners.slice(); |
- for (var i = 0; i < this._listeners.length; i++) |
- results.push(this._listeners[i].apply(null, arguments)); |
+ for (var i = 0; i < listeners.length; i++) |
+ results.push(listeners[i].apply(null, arguments)); |
return results; |
} |
}; |
})(); |