AbortController class

The AbortController can be used to create an AbortSignal this signal can then be used for async tasks that may take longer like for example a fetch. It can then be aborted earlier.

See:

Annotations
  • @JS("window.AbortController")

Constructors

AbortController.new()
Create a new instance of the AbortController.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
signal AbortSignal
Get the AbortSignal that is connected to this controller.
no setter

Methods

abort([dynamic reason]) → void
Abort the signal with a reason. This can be an Error, but also a string or any other Object you may want.
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