From 72f03b2a472f4f2ec2e80ee7f0bd2b086256a0e7 Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Mon, 25 Sep 2017 15:42:08 +0200 Subject: [PATCH] Allow passing arguments when firing events --- www/common/common-util.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/common-util.js b/www/common/common-util.js index aed4dd5d2..618896955 100644 --- a/www/common/common-util.js +++ b/www/common/common-util.js @@ -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); }); } }; };