files/en-us/web/api/tasksignal/priority/index.md
{{APIRef("Prioritized Task Scheduling API")}}{{AvailableInWorkers}}
The read-only priority property of the {{domxref("TaskSignal")}} interface indicates the signal priority.
The initial value is set in the associated {{domxref("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 {{domxref("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.
A string indicating the signal priority.
This will be one of: "user-blocking", "user-visible", "background".
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}}
{{Compat}}