TaskController Class

Aborts the tasks of a Scheduler that were posted with its signal and changes their priority (https://wicg.github.io/scheduling-apis/#sec-task-controller).

public sealed class TaskController : AbortController
Inheritance
AbortController TaskController

Constructors

NameDescription
TaskController(TaskControllerInit?)Creates a controller whose signal is a new TaskSignal with the priority of init (TaskPriority.UserVisible by default).

TaskController(TaskControllerInit?)

TaskSignal.cs

Creates a controller whose signal is a new TaskSignal with the priority of init (TaskPriority.UserVisible by default).

public TaskController(TaskControllerInit? init = null)

Properties

NameDescription
SignalGets the signal controlled by the controller, which is a TaskSignal.

Gets the signal controlled by the controller, which is a TaskSignal.

public new TaskSignal Signal { get; }

Property value

TaskSignal

Methods

NameDescription
SetPriority(TaskPriority)Changes the priority of the signal (https://wicg.github.io/scheduling-apis/#dom-taskcontroller-setpriority): the tasks and the continuations that were scheduled with the signal get the priority, and prioritychange is fired at the signal and at the signals that depend on it.

SetPriority(TaskPriority)

TaskSignal.cs

Changes the priority of the signal (https://wicg.github.io/scheduling-apis/#dom-taskcontroller-setpriority): the tasks and the continuations that were scheduled with the signal get the priority, and prioritychange is fired at the signal and at the signals that depend on it.

public void SetPriority(TaskPriority priority)

Parameters

priority TaskPriority

Exceptions

DomException
The priority of the signal is being changed (NotAllowedError).

See also