From c4a66cff0ab83d192db9a4c0171e0f3283cea57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 14 Nov 2012 01:31:34 -0800 Subject: [PATCH] Support more than one argument in Callback#fire(). --- src/core/Callback.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/Callback.js b/src/core/Callback.js index b125ebb7..107553fe 100644 --- a/src/core/Callback.js +++ b/src/core/Callback.js @@ -72,11 +72,12 @@ var Callback = { var handlers = this._handlers && this._handlers[type]; if (!handlers) return false; + var args = [].slice.call(arguments, 1); Base.each(handlers, function(func) { // When the handler function returns false, prevent the default // behaviour of the event by calling stop() on it // PORT: Add to Sg - if (func.call(this, event) === false && event && event.stop) + if (func.apply(this, args) === false && event && event.stop) event.stop(); }, this); return true;