Open
Description
它本身已对xhr做过一次代理
window._ahrealxhr = window._ahrealxhr || XMLHttpRequest,
XMLHttpRequest = function() {
for (var attr in this.xhr = new window._ahrealxhr,
this.xhr) {
var type = "";
try {
type = _typeof(this.xhr[attr])
} catch (e) {}
"function" === type ? this[attr] = hookfun(attr) : Object.defineProperty(this, attr, {
get: getFactory(attr),
set: setFactory(attr)
})
}
}
Metadata
Assignees
Labels
No labels
Activity