Allow passing arguments when firing events
This commit is contained in:
1 parent
b871faffc9
commit
b15527565c
1 file changed
+2
-1
@@ -18,7 +18,8 @@ define([], function () {
|
||||
fire: function () {
|
||||
if (fired) { return; }
|
||||
fired = true;
|
||||
handlers.forEach(function (h) { h(); });
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
handlers.forEach(function (h) { h.apply(null, args); });
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user