Why does the first case not work? It is a reference to exactly the same function, only in singleton format.
Case 1..
var n = {
doThis: function(e){
console.log('hello world');
}
};
xhr.upload.onprogress = n.doThis(e);
Case 2..
xhr.upload.onprogress = function(e){
console.log('hello world');
}