AbortSignal.aborted

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;

Boolean

예제

다음 스니펫에서는 새로운 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 초기 정의

브라우저 호환성

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
aborted
Experimental
Chrome Full support 66Edge Full support 16Firefox Full support 57IE No support NoOpera Full support 53Safari Full support 11.1WebView Android Full support 66Chrome Android Full support 66Firefox Android Full support 57Opera Android Full support 47Safari iOS Full support 11.3Samsung Internet Android Full support 9.0

Legend

Full support  
Full support
No support  
No support
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.

See also