Bug 1841281 - Disable test_basics.html on mac debug and windows for frequent failures...
[gecko.git] / dom / webidl / WebTaskScheduling.webidl
blob727484aa3fd06f956d867f9ec49b2191e74aed3c
1 enum TaskPriority {
2   "user-blocking",
3   "user-visible",
4   "background"
5 };
7 [Exposed=(Window, Worker), Pref="dom.enable_web_task_scheduling"]
8 interface TaskSignal : AbortSignal {
9   readonly attribute TaskPriority priority;
11   attribute EventHandler onprioritychange;
15 dictionary SchedulerPostTaskOptions {
16   AbortSignal signal;
17   TaskPriority priority;
18   [EnforceRange] unsigned long long delay = 0;
21 callback SchedulerPostTaskCallback = any ();
23 [Exposed=(Window, Worker), Pref="dom.enable_web_task_scheduling"]
24 interface Scheduler {
25   [UseCounter]
26   Promise<any> postTask(
27     SchedulerPostTaskCallback callback,
28     optional SchedulerPostTaskOptions options = {}
29   );
32 dictionary TaskControllerInit {
33   TaskPriority priority = "user-visible";
36 [Exposed=(Window,Worker), Pref="dom.enable_web_task_scheduling"]
37 interface TaskController : AbortController {
38   [Throws]
39   constructor(optional TaskControllerInit init = {});
41   [Throws]
42   undefined setPriority(TaskPriority priority);