Function.prototype.after = function(afterFn){
var _this = this;
return function(){
var res = _this.apply(this,arguments)
afterFn.apply(this,arguments)
return res;
}
}
Function.prototype.before = function(beforeFn){
var _this = this;
return function(){
beforeFn.apply(this,arguments)
return _this.apply(this,arguments);
}
}
window.onload = function(){
console.log('9999onload')
}
window.onload = (window.onload|| function(){}).after(function(){
console.log(88)
})