这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
aborted
只读特性返回
布尔
that indicates whether the DOM request(s) the signal is communicating with is/are aborted (
true
) 或不 (
false
).
var isAborted = abortSignal.aborted;
A
布尔
In the following snippet, we create a new
AbortController
object, and get its
AbortSignal
(available in the
signal
property). Later on we check whether or not it the signal has been aborted using the
aborted
property, and send an appropriate log to the console.
var controller = new AbortController();
var signal = controller.signal;
// ...
signal.aborted ? console.log('Request has been aborted') : console.log('Request not aborted');
| 规范 | 状态 | 注释 |
|---|---|---|
|
DOM
在该规范中的 onabort 定义。 |
实时标准 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
aborted
|
Chrome 66 | Edge 16 | Firefox 57 | IE No | Opera 53 | Safari 11.1 | WebView Android 66 | Chrome Android 66 | Firefox Android 57 | Opera Android 47 | Safari iOS 11.3 | Samsung Internet Android 9.0 |
完整支持
不支持
实验。期望将来行为有所改变。
AbortSignal
aborted
onabort
AbortController
AbstractRange
Attr
ByteString
CDATASection
CSSPrimitiveValue
CSSValue
CSSValueList
CharacterData
ChildNode
注释
CustomEvent
DOMConfiguration
DOMError
DOMErrorHandler
DOMException
DOMImplementation
DOMImplementationList
DOMImplementationRegistry
DOMImplementationSource
DOMLocator
DOMObject
DOMParser
DOMPoint
DOMPointInit
DOMPointReadOnly
DOMRect
DOMString
DOMTimeStamp
DOMTokenList
DOMUserData
Document
DocumentFragment
DocumentType
元素
ElementTraversal
Entity
EntityReference
事件
EventTarget
HTMLCollection
MutationObserver
节点
NodeFilter
NodeIterator
NodeList
NonDocumentTypeChildNode
ProcessingInstruction
PromiseResolver
范围
StaticRange
文本
TextDecoder
TextEncoder
TimeRanges
TreeWalker
TypeInfo
USVString
UserDataHandler
XMLDocument