xe-ajax
Version:
异步请求函数,用于浏览器和 node.js 的 HTTP 客户端
23 lines (18 loc) • 409 B
JavaScript
var utils = require('../core/utils')
function XEAbortSignal () {
this.onaborted = null
if (utils.IS_DP) {
this._store = { aborted: false }
} else {
this.aborted = false
}
}
if (utils.IS_DP) {
Object.defineProperty(XEAbortSignal.prototype, 'aborted', {
get: function () {
return this._store.aborted
}
})
}
module.exports = XEAbortSignal