Changeset 8249
- Timestamp:
- 04/23/07 14:45:14 (19 months ago)
- Files:
-
- 1 modified
-
dojo/trunk/_base/lang.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dojo/trunk/_base/lang.js
r8235 r8249 130 130 // dojo.hitch(foo, "bar")(); // runs foo.bar() in the scope of foo 131 131 // dojo.hitch(foo, myFunction); // returns a function that runs myFunction in the scope of foo 132 var _a = arguments; 133 if(_a.length > 2){ 134 return dojo._hitchArgs.apply(dojo, _a); 132 if(arguments.length > 2){ 133 return dojo._hitchArgs.apply(dojo, arguments); 135 134 } 136 135 if(!method){ … … 140 139 if(dojo.isString(method)){ 141 140 scope = scope || dojo.global; 142 return function(){ return scope[method].apply(scope, _a||[]); }141 return function(){ return scope[method].apply(scope, arguments||[]); } 143 142 }else{ 144 return (!scope ? method : function(){ return method.apply(scope, _a||[]); });143 return (!scope ? method : function(){ return method.apply(scope, arguments||[]); }); 145 144 } 146 145 }