-
Bug
-
Resolution: Fixed
-
P3
-
8
-
b93
-
Verified
Doing a first bind, then a second with an argument, it fails with:Exception in thread "main" java.lang.IllegalArgumentException: no argument type to append
If no argument is passed, the previously bound this is still the context when doing the second call.
var obj = {
hello:"From obj",
};
var obj2 = {
hello:"From obj2",
};
function doit(cb){
cb();
var cb2 = cb.bind( obj2, "This one is not acccepted");
cb2();
}
doit(function(){
print(this.hello);
}.bind(obj));
If no argument is passed, the previously bound this is still the context when doing the second call.
var obj = {
hello:"From obj",
};
var obj2 = {
hello:"From obj2",
};
function doit(cb){
cb();
var cb2 = cb.bind( obj2, "This one is not acccepted");
cb2();
}
doit(function(){
print(this.hello);
}.bind(obj));