TaskController

open class TaskController(init: TaskControllerInit = definedExternally) : AbortController(source)

The TaskController interface of the Prioritized Task Scheduling API represents a controller object that can be used to both abort and change the priority of one or more prioritized tasks. If there is no need to change task priorities, then AbortController can be used instead.

MDN Reference

Constructors

Link copied to clipboard
constructor(init: TaskControllerInit = definedExternally)

Properties

Link copied to clipboard
open override val signal: AbortSignal

Functions

Link copied to clipboard
fun abort(reason: JsError?)
Link copied to clipboard
fun setPriority(priority: TaskPriority)

The setPriority() method of the TaskController interface can be called to set a new priority for this controller's signal. If a prioritized task is configured to use the signal, this will also change the task priority.