A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/TaskController/TaskController below:

TaskController: TaskController() constructor - Web APIs

TaskController: TaskController() constructor

Limited availability

Note: This feature is available in Web Workers.

The TaskController() constructor creates a new TaskController object, optionally setting the initial priority of its associated signal.

If no priority is set, the signal priority defaults to user-visible

Syntax
new TaskController()
new TaskController(options)
Parameters
options Optional

An object with the following properties:

priority Optional

The priority of the signal associated with this TaskController. One of: "user-blocking", "user-visible" (default), "background".

Examples

This code shows how to construct a task controller that has a signal with default priority (user-visible).

const controller = new TaskController();

To construct a task controller that has a specific signal priority, pass the priority as a property of the optional argument.

controller2 = new TaskController({ priority: "user-blocking" });
Specifications Browser compatibility

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4