You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by zh...@apache.org on 2008/03/07 21:43:19 UTC
svn commit: r634813 - /incubator/shindig/trunk/features/core/legacy.js
Author: zhen
Date: Fri Mar 7 12:43:19 2008
New Revision: 634813
URL: http://svn.apache.org/viewvc?rev=634813&view=rev
Log:
Fixed SHINDIG-114 (added support for _IG_Callback in legacy.js.)
Modified:
incubator/shindig/trunk/features/core/legacy.js
Modified: incubator/shindig/trunk/features/core/legacy.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/core/legacy.js?rev=634813&r1=634812&r2=634813&view=diff
==============================================================================
--- incubator/shindig/trunk/features/core/legacy.js (original)
+++ incubator/shindig/trunk/features/core/legacy.js Fri Mar 7 12:43:19 2008
@@ -65,6 +65,19 @@
gadgets.util.registerOnLoadHandler(callback);
}
+// _IG_Callback takes the arguments in the scope the callback is executed and
+// places them first in the argument array. MakeClosure takes the arguments
+// from the scope at callback construction and pushes them first in the array
+function _IG_Callback(handler_func, var_args) {
+ var orig_args = arguments;
+ return function() {
+ var combined_args = Array.prototype.slice.call(arguments);
+ // call the handler with all args combined
+ handler_func.apply(null,
+ combined_args.concat(Array.prototype.slice.call(orig_args, 1)));
+ };
+}
+
var _args = gadgets.util.getUrlParameters;
/**