W3cubDocs

/Web APIs

TaskSignal: priority property

The read-only priority property of the TaskSignal interface indicates the signal priority.

The initial value is set in the associated TaskController by specifying it as an argument to the TaskController constructor (by default it is "user-visible"). The priority of the signal can be changed by calling TaskController.setPriority() on the associated controller.

For tasks with a mutable priority, this value is used to set the initial task priority and later to change it. Tasks with an immutable priority will ignore the value.

Value

A string indicating the signal priority. This will be one of: "user-blocking", "user-visible", "background".

Examples

The priority is most commonly used by developers to determine the new priority following prioritychange events. See TaskSignal: prioritychange event for a live example.

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
priority 94 94 101 No 80 No 94 94 No 66 No 17.0

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/TaskSignal/priority