You can pass any old object (including null) as the first argument of the call apply()and thiswill remain importantScope.
function f() {
alert(this.foo);
}
var g = f.bind( { foo: "bar"} );
g();
g.apply(null, []);
bind , , this , , bind. , , this . ( , ECMAScript 5, Prototype , , ):
Function.prototype.bind = function(thisValue) {
var f = this;
return function() {
return f.apply(thisValue, arguments);
};
};