Allow passing arguments when firing events

pull/1/head
Caleb James DeLisle 7 years ago
parent b871faffc9
commit b15527565c

@ -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); });
}
};
};

Loading…
Cancel
Save