fix a broken Function.prototype.bind() (Closes #876)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4078 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -167,10 +167,15 @@ Function.prototype.bind = function() {
|
||||
}
|
||||
|
||||
return function(moreargs) {
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
args.push(arguments[i]);
|
||||
var i;
|
||||
var newArgs = [];
|
||||
for (i = 0; i < args.length; i++) {
|
||||
newArgs.push(args[i]);
|
||||
}
|
||||
return __method.apply(object, args);
|
||||
for (i = 0; i < arguments.length; i++) {
|
||||
newArgs.push(arguments[i]);
|
||||
}
|
||||
return __method.apply(object, newArgs);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user