Allow passing arguments when firing events
This commit is contained in:
parent
b643ccc232
commit
72f03b2a47
@ -18,7 +18,8 @@ define([], function () {
|
|||||||
fire: function () {
|
fire: function () {
|
||||||
if (fired) { return; }
|
if (fired) { return; }
|
||||||
fired = true;
|
fired = true;
|
||||||
handlers.forEach(function (h) { h(); });
|
var args = Array.prototype.slice.call(arguments);
|
||||||
|
handlers.forEach(function (h) { h.apply(null, args); });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user