AbortSignal: aborted property
The aborted property indicates whether this signal has been aborted.
Value
A boolean.
true: already aborted.false: not aborted yet.- Read-only; assigning to it throws
TypeError. - When it changes from
falsetotrue, theabortevent fires. Oncetrue, it never changes back.
Examples
js
const controller = new AbortController();
console.log(controller.signal.aborted);
controller.abort();
console.log(controller.signal.aborted);Result: Prints false and true.
Differences from the web
Same as the web.