AbortSignal class

A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.

MDN Reference

Implemented types
Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

AbortSignal()
factory

Properties

aborted bool

Available on AbortSignal, provided by the AbortSignal$Typings extension

Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
no setter
addEventListener → ({void Function<K$>(AbortSignalEventMap<K$> type, dynamic listener(K$), [Object? options]) $1, void Function(String type, Object listener, [Object? options]) $2})

Available on AbortSignal, provided by the AbortSignal$Typings extension

Overload accessor: $1, $2
no setter
addEventListener ↔ void Function(String, [Object?, Object?])

Available on EventTarget, provided by the EventTarget$Typings extension

getter/setter pair
dispatchEvent bool Function(Event)

Available on EventTarget, provided by the EventTarget$Typings extension

getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
onabort ↔ dynamic Function(Event)?

Available on AbortSignal, provided by the AbortSignal$Typings extension

MDN Reference
getter/setter pair
reason → dynamic

Available on AbortSignal, provided by the AbortSignal$Typings extension

MDN Reference
no setter
removeEventListener → ({void Function<K$>(AbortSignalEventMap<K$> type, dynamic listener(K$), [Object? options]) $1, void Function(String type, Object listener, [Object? options]) $2})

Available on AbortSignal, provided by the AbortSignal$Typings extension

Overload accessor: $1, $2
no setter
removeEventListener ↔ void Function(String, [Object?, Object?])

Available on EventTarget, provided by the EventTarget$Typings extension

getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
throwIfAborted ↔ void Function()

Available on AbortSignal, provided by the AbortSignal$Typings extension

getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

abort AbortSignal Function([dynamic])
getter/setter pair
timeout AbortSignal Function(num)
getter/setter pair