(function(window) {
var setTimeout = window.setTimeout;
window.setTimeout = function(callback, delay, context) {
setTimeout(callback.bind(context), delay);
};
})(window);
/***********************/
var obj = {
fn: function() {
alert(this.foo);
},
foo: 'bar'
};
setTimeout(obj.fn, 1000, obj);