Web APIs
Request.signal
Returns the cancellation signal associated with a Request. A supplied signal is followed by the request signal, which need not be the same object.
Formal Syntax & Structure
javascript syntaxjavascript
request.signalReturn Value
AbortSignal
Request cancellation signal.
Working Example
Example Snippetjavascript
const c=new AbortController(); const r=new Request("https://example.invalid/items",{signal:c.signal}); c.abort("closed"); console.log(r.signal.aborted,r.signal.reason);