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.
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.
js
new TaskPriorityChangeEvent(type, options)
   type
    A string with the case-sensitive name of the associated event. User agents set it to "prioritychange".
options
    An object that, in addition of the properties defined in Event(), can have the following properties:
previousPriority
      A string indicating the previous priority of the task. One of: "user-blocking", "user-visible", "background".
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
TaskPriorityChangeEvent | 
       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/TaskPriorityChangeEvent/TaskPriorityChangeEvent