Prioritized Task Scheduling API
The TaskPriorityChangeEvent() constructor creates a new TaskPriorityChangeEvent object.
This object is created with a value indicating the previous priority of the task: the priority before it changed and this event was fired.
Syntax
new TaskPriorityChangeEvent(type, options)
Parameters
-
type- : A string with the case-sensitive name of the associated event.
User agents set it to
"prioritychange".
- : A string with the case-sensitive name of the associated event.
User agents set it to
-
options- : An object that, in addition of the properties defined in Event/Event, can have the following properties:
previousPriority- : A string indicating the previous priority of the task.
One of:
"user-blocking","user-visible","background".
- : A string indicating the previous priority of the task.
One of:
- : An object that, in addition of the properties defined in Event/Event, can have the following properties:
Specifications
Browser compatibility
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
