Skip to main content

Module abort

Module abort 

Source
Expand description

WHATWG AbortController / AbortSignal (spec subset, no external deps). Enough of the standard for fetch(..., { signal }), AbortSignal.timeout(ms), AbortSignal.any([...]), onabort, addEventListener('abort', ...), .aborted, .reason, .throwIfAborted().

JS-visible reason/listeners are stored natively on a 'js-generic class (no synthesized __ properties). A separate Send/Sync AbortInner channel lets fetch await an abort from the request future and drop it (the spec’s “abort the fetch”).

Structs§

AbortControllerJs
AbortInner
Native, thread-safe side of a signal: lets a fetch request future observe an abort that happens on the JS thread and cancel itself.
AbortSignalJs