This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
aborted
읽기 전용 프로퍼티는 신호가 통신하는 DOM 요청이 취소되었는지(true
) 그렇지 않은지(false
)를 나타내는 Boolean
을 반환한다.
구문
var isAborted = abortSignal.aborted;
값
예제
다음 스니펫에서는 새로운 AbortController
객체를 생성하고 AbortSignal
를 얻는다(signal
프로퍼티에서 가능). 그 다음 aborted
프로퍼티를 사용해 신호가 취소되었는지 확인하고 콘솔로 적절한 로그를 전송한다.
var controller = new AbortController();
var signal = controller.signal;
// ...
signal.aborted ? console.log('Request has been aborted') : console.log('Request not aborted');
명세
명세 | 상태 | 코멘트 |
---|---|---|
DOM The definition of 'onabort' in that specification. |
Living Standard | 초기 정의 |
브라우저 호환성
BCD tables only load in the browser
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.