@types/web 0.0.254 → 0.0.256

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -47,4 +47,4 @@ Prior to `@types/web` the web APIs were deployed with a version of TypeScript, a
47
47
 
48
48
  ## Deploy Metadata
49
49
 
50
- You can read what changed in version 0.0.254 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.254.
50
+ You can read what changed in version 0.0.256 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.256.
package/index.d.ts CHANGED
@@ -2135,6 +2135,12 @@ interface SVGBoundingBoxOptions {
2135
2135
  stroke?: boolean;
2136
2136
  }
2137
2137
 
2138
+ interface SchedulerPostTaskOptions {
2139
+ delay?: number;
2140
+ priority?: TaskPriority;
2141
+ signal?: AbortSignal;
2142
+ }
2143
+
2138
2144
  interface ScrollIntoViewOptions extends ScrollOptions {
2139
2145
  block?: ScrollLogicalPosition;
2140
2146
  inline?: ScrollLogicalPosition;
@@ -2268,6 +2274,18 @@ interface SubmitEventInit extends EventInit {
2268
2274
  submitter?: HTMLElement | null;
2269
2275
  }
2270
2276
 
2277
+ interface TaskControllerInit {
2278
+ priority?: TaskPriority;
2279
+ }
2280
+
2281
+ interface TaskPriorityChangeEventInit extends EventInit {
2282
+ previousPriority: TaskPriority;
2283
+ }
2284
+
2285
+ interface TaskSignalAnyInit {
2286
+ priority?: TaskPriority | TaskSignal;
2287
+ }
2288
+
2271
2289
  interface TextDecodeOptions {
2272
2290
  stream?: boolean;
2273
2291
  }
@@ -3040,6 +3058,12 @@ interface Animation extends EventTarget {
3040
3058
  onfinish: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null;
3041
3059
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/remove_event) */
3042
3060
  onremove: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null;
3061
+ /**
3062
+ * The **`overallProgress`** read-only property of the Animation interface returns a number between `0` and `1` indicating the animation's overall progress towards its finished state.
3063
+ *
3064
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/overallProgress)
3065
+ */
3066
+ readonly overallProgress: number | null;
3043
3067
  /**
3044
3068
  * The read-only **`Animation.pending`** property of the Web Animations API indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
3045
3069
  *
@@ -8098,8 +8122,11 @@ interface CanvasUserInterface {
8098
8122
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CaretPosition)
8099
8123
  */
8100
8124
  interface CaretPosition {
8125
+ /** The **`offset`** property of the CaretPosition interface returns an integer representing the offset of the selection in the caret position node. */
8101
8126
  readonly offset: number;
8127
+ /** The **`offsetNode`** property of the CaretPosition interface returns a Node containing the found node at the caret's position. */
8102
8128
  readonly offsetNode: Node;
8129
+ /** The `getClientRect()` method of the CaretPosition interface returns the client rectangle for the caret range. */
8103
8130
  getClientRect(): DOMRect | null;
8104
8131
  }
8105
8132
 
@@ -10461,6 +10488,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve
10461
10488
  createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
10462
10489
  createEvent(eventInterface: "StorageEvent"): StorageEvent;
10463
10490
  createEvent(eventInterface: "SubmitEvent"): SubmitEvent;
10491
+ createEvent(eventInterface: "TaskPriorityChangeEvent"): TaskPriorityChangeEvent;
10464
10492
  createEvent(eventInterface: "TextEvent"): TextEvent;
10465
10493
  createEvent(eventInterface: "ToggleEvent"): ToggleEvent;
10466
10494
  createEvent(eventInterface: "TouchEvent"): TouchEvent;
@@ -26680,9 +26708,17 @@ declare var Response: {
26680
26708
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAElement)
26681
26709
  */
26682
26710
  interface SVGAElement extends SVGGraphicsElement, SVGURIReference {
26683
- /** The **`rel`** property of the SVGAElement returns a string reflecting the value of the `rel` attribute of the SVG a element. */
26711
+ /**
26712
+ * The **`rel`** property of the SVGAElement returns a string reflecting the value of the `rel` attribute of the SVG a element.
26713
+ *
26714
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAElement/rel)
26715
+ */
26684
26716
  rel: string;
26685
- /** The **`relList`** read-only property of the SVGAElement returns a live DOMTokenList reflecting the space-separated string `<list-of-Link-Types>` values of the `rel` attribute of the SVG a element. */
26717
+ /**
26718
+ * The **`relList`** read-only property of the SVGAElement returns a live DOMTokenList reflecting the space-separated string `<list-of-Link-Types>` values of the `rel` attribute of the SVG a element.
26719
+ *
26720
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAElement/relList)
26721
+ */
26686
26722
  get relList(): DOMTokenList;
26687
26723
  set relList(value: string);
26688
26724
  /**
@@ -30431,6 +30467,31 @@ declare var SVGViewElement: {
30431
30467
  new(): SVGViewElement;
30432
30468
  };
30433
30469
 
30470
+ /**
30471
+ * The **`Scheduler`** interface of the Prioritized Task Scheduling API provides methods for scheduling prioritized tasks.
30472
+ *
30473
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler)
30474
+ */
30475
+ interface Scheduler {
30476
+ /**
30477
+ * The **`postTask()`** method of the Scheduler interface is used for adding tasks to be scheduled according to their priority.
30478
+ *
30479
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/postTask)
30480
+ */
30481
+ postTask(callback: SchedulerPostTaskCallback, options?: SchedulerPostTaskOptions): Promise<any>;
30482
+ /**
30483
+ * The **`yield()`** method of the Scheduler interface is used for yielding to the main thread during a task and continuing execution later, with the continuation scheduled as a prioritized task (see the Prioritized Task Scheduling API for more information).
30484
+ *
30485
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/yield)
30486
+ */
30487
+ yield(): Promise<void>;
30488
+ }
30489
+
30490
+ declare var Scheduler: {
30491
+ prototype: Scheduler;
30492
+ new(): Scheduler;
30493
+ };
30494
+
30434
30495
  /**
30435
30496
  * The `Screen` interface represents a screen, usually the one on which the current window is being rendered, and is obtained using window.screen.
30436
30497
  *
@@ -32096,6 +32157,79 @@ declare var SubtleCrypto: {
32096
32157
  new(): SubtleCrypto;
32097
32158
  };
32098
32159
 
32160
+ /**
32161
+ * The **`TaskController`** interface of the Prioritized Task Scheduling API represents a controller object that can be used to both abort and change the priority of one or more prioritized tasks.
32162
+ *
32163
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController)
32164
+ */
32165
+ interface TaskController extends AbortController {
32166
+ /**
32167
+ * The **`setPriority()`** method of the TaskController interface can be called to set a new priority for this controller's `signal`.
32168
+ *
32169
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController/setPriority)
32170
+ */
32171
+ setPriority(priority: TaskPriority): void;
32172
+ }
32173
+
32174
+ declare var TaskController: {
32175
+ prototype: TaskController;
32176
+ new(init?: TaskControllerInit): TaskController;
32177
+ };
32178
+
32179
+ /**
32180
+ * The **`TaskPriorityChangeEvent`** is the interface for the `prioritychange` event.
32181
+ *
32182
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent)
32183
+ */
32184
+ interface TaskPriorityChangeEvent extends Event {
32185
+ /**
32186
+ * The **`previousPriority`** read-only property of the TaskPriorityChangeEvent interface returns the priority of the corresponding TaskSignal before it was changed and this `prioritychange` event was emitted.
32187
+ *
32188
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent/previousPriority)
32189
+ */
32190
+ readonly previousPriority: TaskPriority;
32191
+ }
32192
+
32193
+ declare var TaskPriorityChangeEvent: {
32194
+ prototype: TaskPriorityChangeEvent;
32195
+ new(type: string, priorityChangeEventInitDict: TaskPriorityChangeEventInit): TaskPriorityChangeEvent;
32196
+ };
32197
+
32198
+ interface TaskSignalEventMap extends AbortSignalEventMap {
32199
+ "prioritychange": TaskPriorityChangeEvent;
32200
+ }
32201
+
32202
+ /**
32203
+ * The **`TaskSignal`** interface of the Prioritized Task Scheduling API represents a signal object that allows you to communicate with a prioritized task, and abort it or change the priority (if required) via a TaskController object.
32204
+ *
32205
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal)
32206
+ */
32207
+ interface TaskSignal extends AbortSignal {
32208
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/prioritychange_event) */
32209
+ onprioritychange: ((this: TaskSignal, ev: TaskPriorityChangeEvent) => any) | null;
32210
+ /**
32211
+ * The read-only **`priority`** property of the TaskSignal interface indicates the signal priority.
32212
+ *
32213
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/priority)
32214
+ */
32215
+ readonly priority: TaskPriority;
32216
+ addEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
32217
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
32218
+ removeEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
32219
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
32220
+ }
32221
+
32222
+ declare var TaskSignal: {
32223
+ prototype: TaskSignal;
32224
+ new(): TaskSignal;
32225
+ /**
32226
+ * The **`TaskSignal.any()`** static method takes an iterable of AbortSignal objects and returns a TaskSignal.
32227
+ *
32228
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/any_static)
32229
+ */
32230
+ any(signals: AbortSignal[], init?: TaskSignalAnyInit): TaskSignal;
32231
+ };
32232
+
32099
32233
  /**
32100
32234
  * The **`Text`** interface represents a text Node in a DOM tree.
32101
32235
  *
@@ -37379,6 +37513,8 @@ interface WindowOrWorkerGlobalScope {
37379
37513
  readonly origin: string;
37380
37514
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
37381
37515
  readonly performance: Performance;
37516
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
37517
+ readonly scheduler: Scheduler;
37382
37518
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
37383
37519
  atob(data: string): string;
37384
37520
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
@@ -38611,6 +38747,10 @@ interface ResizeObserverCallback {
38611
38747
  (entries: ResizeObserverEntry[], observer: ResizeObserver): void;
38612
38748
  }
38613
38749
 
38750
+ interface SchedulerPostTaskCallback {
38751
+ (): any;
38752
+ }
38753
+
38614
38754
  interface TransformerFlushCallback<O> {
38615
38755
  (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
38616
38756
  }
@@ -39664,6 +39804,8 @@ declare var isSecureContext: boolean;
39664
39804
  declare var origin: string;
39665
39805
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
39666
39806
  declare var performance: Performance;
39807
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
39808
+ declare var scheduler: Scheduler;
39667
39809
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
39668
39810
  declare function atob(data: string): string;
39669
39811
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
@@ -39951,6 +40093,7 @@ type ShadowRootMode = "closed" | "open";
39951
40093
  type SlotAssignmentMode = "manual" | "named";
39952
40094
  type SpeechRecognitionErrorCode = "aborted" | "audio-capture" | "language-not-supported" | "network" | "no-speech" | "not-allowed" | "phrases-not-supported" | "service-not-allowed";
39953
40095
  type SpeechSynthesisErrorCode = "audio-busy" | "audio-hardware" | "canceled" | "interrupted" | "invalid-argument" | "language-unavailable" | "network" | "not-allowed" | "synthesis-failed" | "synthesis-unavailable" | "text-too-long" | "voice-unavailable";
40096
+ type TaskPriority = "background" | "user-blocking" | "user-visible";
39954
40097
  type TextTrackKind = "captions" | "chapters" | "descriptions" | "metadata" | "subtitles";
39955
40098
  type TextTrackMode = "disabled" | "hidden" | "showing";
39956
40099
  type TouchType = "direct" | "stylus";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/web",
3
- "version": "0.0.254",
3
+ "version": "0.0.256",
4
4
  "description": "Types for the DOM, and other web technologies in browsers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
package/ts5.5/index.d.ts CHANGED
@@ -2135,6 +2135,12 @@ interface SVGBoundingBoxOptions {
2135
2135
  stroke?: boolean;
2136
2136
  }
2137
2137
 
2138
+ interface SchedulerPostTaskOptions {
2139
+ delay?: number;
2140
+ priority?: TaskPriority;
2141
+ signal?: AbortSignal;
2142
+ }
2143
+
2138
2144
  interface ScrollIntoViewOptions extends ScrollOptions {
2139
2145
  block?: ScrollLogicalPosition;
2140
2146
  inline?: ScrollLogicalPosition;
@@ -2268,6 +2274,18 @@ interface SubmitEventInit extends EventInit {
2268
2274
  submitter?: HTMLElement | null;
2269
2275
  }
2270
2276
 
2277
+ interface TaskControllerInit {
2278
+ priority?: TaskPriority;
2279
+ }
2280
+
2281
+ interface TaskPriorityChangeEventInit extends EventInit {
2282
+ previousPriority: TaskPriority;
2283
+ }
2284
+
2285
+ interface TaskSignalAnyInit {
2286
+ priority?: TaskPriority | TaskSignal;
2287
+ }
2288
+
2271
2289
  interface TextDecodeOptions {
2272
2290
  stream?: boolean;
2273
2291
  }
@@ -3040,6 +3058,12 @@ interface Animation extends EventTarget {
3040
3058
  onfinish: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null;
3041
3059
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/remove_event) */
3042
3060
  onremove: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null;
3061
+ /**
3062
+ * The **`overallProgress`** read-only property of the Animation interface returns a number between `0` and `1` indicating the animation's overall progress towards its finished state.
3063
+ *
3064
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/overallProgress)
3065
+ */
3066
+ readonly overallProgress: number | null;
3043
3067
  /**
3044
3068
  * The read-only **`Animation.pending`** property of the Web Animations API indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
3045
3069
  *
@@ -8090,8 +8114,11 @@ interface CanvasUserInterface {
8090
8114
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CaretPosition)
8091
8115
  */
8092
8116
  interface CaretPosition {
8117
+ /** The **`offset`** property of the CaretPosition interface returns an integer representing the offset of the selection in the caret position node. */
8093
8118
  readonly offset: number;
8119
+ /** The **`offsetNode`** property of the CaretPosition interface returns a Node containing the found node at the caret's position. */
8094
8120
  readonly offsetNode: Node;
8121
+ /** The `getClientRect()` method of the CaretPosition interface returns the client rectangle for the caret range. */
8095
8122
  getClientRect(): DOMRect | null;
8096
8123
  }
8097
8124
 
@@ -10453,6 +10480,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve
10453
10480
  createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
10454
10481
  createEvent(eventInterface: "StorageEvent"): StorageEvent;
10455
10482
  createEvent(eventInterface: "SubmitEvent"): SubmitEvent;
10483
+ createEvent(eventInterface: "TaskPriorityChangeEvent"): TaskPriorityChangeEvent;
10456
10484
  createEvent(eventInterface: "TextEvent"): TextEvent;
10457
10485
  createEvent(eventInterface: "ToggleEvent"): ToggleEvent;
10458
10486
  createEvent(eventInterface: "TouchEvent"): TouchEvent;
@@ -26659,9 +26687,17 @@ declare var Response: {
26659
26687
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAElement)
26660
26688
  */
26661
26689
  interface SVGAElement extends SVGGraphicsElement, SVGURIReference {
26662
- /** The **`rel`** property of the SVGAElement returns a string reflecting the value of the `rel` attribute of the SVG a element. */
26690
+ /**
26691
+ * The **`rel`** property of the SVGAElement returns a string reflecting the value of the `rel` attribute of the SVG a element.
26692
+ *
26693
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAElement/rel)
26694
+ */
26663
26695
  rel: string;
26664
- /** The **`relList`** read-only property of the SVGAElement returns a live DOMTokenList reflecting the space-separated string `<list-of-Link-Types>` values of the `rel` attribute of the SVG a element. */
26696
+ /**
26697
+ * The **`relList`** read-only property of the SVGAElement returns a live DOMTokenList reflecting the space-separated string `<list-of-Link-Types>` values of the `rel` attribute of the SVG a element.
26698
+ *
26699
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAElement/relList)
26700
+ */
26665
26701
  readonly relList: DOMTokenList;
26666
26702
  /**
26667
26703
  * The **`SVGAElement.target`** read-only property of SVGAElement returns an SVGAnimatedString object that specifies the portion of a target window, frame, pane into which a document is to be opened when a link is activated.
@@ -30409,6 +30445,31 @@ declare var SVGViewElement: {
30409
30445
  new(): SVGViewElement;
30410
30446
  };
30411
30447
 
30448
+ /**
30449
+ * The **`Scheduler`** interface of the Prioritized Task Scheduling API provides methods for scheduling prioritized tasks.
30450
+ *
30451
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler)
30452
+ */
30453
+ interface Scheduler {
30454
+ /**
30455
+ * The **`postTask()`** method of the Scheduler interface is used for adding tasks to be scheduled according to their priority.
30456
+ *
30457
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/postTask)
30458
+ */
30459
+ postTask(callback: SchedulerPostTaskCallback, options?: SchedulerPostTaskOptions): Promise<any>;
30460
+ /**
30461
+ * The **`yield()`** method of the Scheduler interface is used for yielding to the main thread during a task and continuing execution later, with the continuation scheduled as a prioritized task (see the Prioritized Task Scheduling API for more information).
30462
+ *
30463
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/yield)
30464
+ */
30465
+ yield(): Promise<void>;
30466
+ }
30467
+
30468
+ declare var Scheduler: {
30469
+ prototype: Scheduler;
30470
+ new(): Scheduler;
30471
+ };
30472
+
30412
30473
  /**
30413
30474
  * The `Screen` interface represents a screen, usually the one on which the current window is being rendered, and is obtained using window.screen.
30414
30475
  *
@@ -32073,6 +32134,79 @@ declare var SubtleCrypto: {
32073
32134
  new(): SubtleCrypto;
32074
32135
  };
32075
32136
 
32137
+ /**
32138
+ * The **`TaskController`** interface of the Prioritized Task Scheduling API represents a controller object that can be used to both abort and change the priority of one or more prioritized tasks.
32139
+ *
32140
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController)
32141
+ */
32142
+ interface TaskController extends AbortController {
32143
+ /**
32144
+ * The **`setPriority()`** method of the TaskController interface can be called to set a new priority for this controller's `signal`.
32145
+ *
32146
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController/setPriority)
32147
+ */
32148
+ setPriority(priority: TaskPriority): void;
32149
+ }
32150
+
32151
+ declare var TaskController: {
32152
+ prototype: TaskController;
32153
+ new(init?: TaskControllerInit): TaskController;
32154
+ };
32155
+
32156
+ /**
32157
+ * The **`TaskPriorityChangeEvent`** is the interface for the `prioritychange` event.
32158
+ *
32159
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent)
32160
+ */
32161
+ interface TaskPriorityChangeEvent extends Event {
32162
+ /**
32163
+ * The **`previousPriority`** read-only property of the TaskPriorityChangeEvent interface returns the priority of the corresponding TaskSignal before it was changed and this `prioritychange` event was emitted.
32164
+ *
32165
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent/previousPriority)
32166
+ */
32167
+ readonly previousPriority: TaskPriority;
32168
+ }
32169
+
32170
+ declare var TaskPriorityChangeEvent: {
32171
+ prototype: TaskPriorityChangeEvent;
32172
+ new(type: string, priorityChangeEventInitDict: TaskPriorityChangeEventInit): TaskPriorityChangeEvent;
32173
+ };
32174
+
32175
+ interface TaskSignalEventMap extends AbortSignalEventMap {
32176
+ "prioritychange": TaskPriorityChangeEvent;
32177
+ }
32178
+
32179
+ /**
32180
+ * The **`TaskSignal`** interface of the Prioritized Task Scheduling API represents a signal object that allows you to communicate with a prioritized task, and abort it or change the priority (if required) via a TaskController object.
32181
+ *
32182
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal)
32183
+ */
32184
+ interface TaskSignal extends AbortSignal {
32185
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/prioritychange_event) */
32186
+ onprioritychange: ((this: TaskSignal, ev: TaskPriorityChangeEvent) => any) | null;
32187
+ /**
32188
+ * The read-only **`priority`** property of the TaskSignal interface indicates the signal priority.
32189
+ *
32190
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/priority)
32191
+ */
32192
+ readonly priority: TaskPriority;
32193
+ addEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
32194
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
32195
+ removeEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
32196
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
32197
+ }
32198
+
32199
+ declare var TaskSignal: {
32200
+ prototype: TaskSignal;
32201
+ new(): TaskSignal;
32202
+ /**
32203
+ * The **`TaskSignal.any()`** static method takes an iterable of AbortSignal objects and returns a TaskSignal.
32204
+ *
32205
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/any_static)
32206
+ */
32207
+ any(signals: AbortSignal[], init?: TaskSignalAnyInit): TaskSignal;
32208
+ };
32209
+
32076
32210
  /**
32077
32211
  * The **`Text`** interface represents a text Node in a DOM tree.
32078
32212
  *
@@ -37356,6 +37490,8 @@ interface WindowOrWorkerGlobalScope {
37356
37490
  readonly origin: string;
37357
37491
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
37358
37492
  readonly performance: Performance;
37493
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
37494
+ readonly scheduler: Scheduler;
37359
37495
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
37360
37496
  atob(data: string): string;
37361
37497
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
@@ -38588,6 +38724,10 @@ interface ResizeObserverCallback {
38588
38724
  (entries: ResizeObserverEntry[], observer: ResizeObserver): void;
38589
38725
  }
38590
38726
 
38727
+ interface SchedulerPostTaskCallback {
38728
+ (): any;
38729
+ }
38730
+
38591
38731
  interface TransformerFlushCallback<O> {
38592
38732
  (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
38593
38733
  }
@@ -39641,6 +39781,8 @@ declare var isSecureContext: boolean;
39641
39781
  declare var origin: string;
39642
39782
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
39643
39783
  declare var performance: Performance;
39784
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
39785
+ declare var scheduler: Scheduler;
39644
39786
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
39645
39787
  declare function atob(data: string): string;
39646
39788
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
@@ -39928,6 +40070,7 @@ type ShadowRootMode = "closed" | "open";
39928
40070
  type SlotAssignmentMode = "manual" | "named";
39929
40071
  type SpeechRecognitionErrorCode = "aborted" | "audio-capture" | "language-not-supported" | "network" | "no-speech" | "not-allowed" | "phrases-not-supported" | "service-not-allowed";
39930
40072
  type SpeechSynthesisErrorCode = "audio-busy" | "audio-hardware" | "canceled" | "interrupted" | "invalid-argument" | "language-unavailable" | "network" | "not-allowed" | "synthesis-failed" | "synthesis-unavailable" | "text-too-long" | "voice-unavailable";
40073
+ type TaskPriority = "background" | "user-blocking" | "user-visible";
39931
40074
  type TextTrackKind = "captions" | "chapters" | "descriptions" | "metadata" | "subtitles";
39932
40075
  type TextTrackMode = "disabled" | "hidden" | "showing";
39933
40076
  type TouchType = "direct" | "stylus";
package/ts5.6/index.d.ts CHANGED
@@ -2135,6 +2135,12 @@ interface SVGBoundingBoxOptions {
2135
2135
  stroke?: boolean;
2136
2136
  }
2137
2137
 
2138
+ interface SchedulerPostTaskOptions {
2139
+ delay?: number;
2140
+ priority?: TaskPriority;
2141
+ signal?: AbortSignal;
2142
+ }
2143
+
2138
2144
  interface ScrollIntoViewOptions extends ScrollOptions {
2139
2145
  block?: ScrollLogicalPosition;
2140
2146
  inline?: ScrollLogicalPosition;
@@ -2268,6 +2274,18 @@ interface SubmitEventInit extends EventInit {
2268
2274
  submitter?: HTMLElement | null;
2269
2275
  }
2270
2276
 
2277
+ interface TaskControllerInit {
2278
+ priority?: TaskPriority;
2279
+ }
2280
+
2281
+ interface TaskPriorityChangeEventInit extends EventInit {
2282
+ previousPriority: TaskPriority;
2283
+ }
2284
+
2285
+ interface TaskSignalAnyInit {
2286
+ priority?: TaskPriority | TaskSignal;
2287
+ }
2288
+
2271
2289
  interface TextDecodeOptions {
2272
2290
  stream?: boolean;
2273
2291
  }
@@ -3040,6 +3058,12 @@ interface Animation extends EventTarget {
3040
3058
  onfinish: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null;
3041
3059
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/remove_event) */
3042
3060
  onremove: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null;
3061
+ /**
3062
+ * The **`overallProgress`** read-only property of the Animation interface returns a number between `0` and `1` indicating the animation's overall progress towards its finished state.
3063
+ *
3064
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/overallProgress)
3065
+ */
3066
+ readonly overallProgress: number | null;
3043
3067
  /**
3044
3068
  * The read-only **`Animation.pending`** property of the Web Animations API indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
3045
3069
  *
@@ -8098,8 +8122,11 @@ interface CanvasUserInterface {
8098
8122
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CaretPosition)
8099
8123
  */
8100
8124
  interface CaretPosition {
8125
+ /** The **`offset`** property of the CaretPosition interface returns an integer representing the offset of the selection in the caret position node. */
8101
8126
  readonly offset: number;
8127
+ /** The **`offsetNode`** property of the CaretPosition interface returns a Node containing the found node at the caret's position. */
8102
8128
  readonly offsetNode: Node;
8129
+ /** The `getClientRect()` method of the CaretPosition interface returns the client rectangle for the caret range. */
8103
8130
  getClientRect(): DOMRect | null;
8104
8131
  }
8105
8132
 
@@ -10461,6 +10488,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve
10461
10488
  createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
10462
10489
  createEvent(eventInterface: "StorageEvent"): StorageEvent;
10463
10490
  createEvent(eventInterface: "SubmitEvent"): SubmitEvent;
10491
+ createEvent(eventInterface: "TaskPriorityChangeEvent"): TaskPriorityChangeEvent;
10464
10492
  createEvent(eventInterface: "TextEvent"): TextEvent;
10465
10493
  createEvent(eventInterface: "ToggleEvent"): ToggleEvent;
10466
10494
  createEvent(eventInterface: "TouchEvent"): TouchEvent;
@@ -26680,9 +26708,17 @@ declare var Response: {
26680
26708
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAElement)
26681
26709
  */
26682
26710
  interface SVGAElement extends SVGGraphicsElement, SVGURIReference {
26683
- /** The **`rel`** property of the SVGAElement returns a string reflecting the value of the `rel` attribute of the SVG a element. */
26711
+ /**
26712
+ * The **`rel`** property of the SVGAElement returns a string reflecting the value of the `rel` attribute of the SVG a element.
26713
+ *
26714
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAElement/rel)
26715
+ */
26684
26716
  rel: string;
26685
- /** The **`relList`** read-only property of the SVGAElement returns a live DOMTokenList reflecting the space-separated string `<list-of-Link-Types>` values of the `rel` attribute of the SVG a element. */
26717
+ /**
26718
+ * The **`relList`** read-only property of the SVGAElement returns a live DOMTokenList reflecting the space-separated string `<list-of-Link-Types>` values of the `rel` attribute of the SVG a element.
26719
+ *
26720
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAElement/relList)
26721
+ */
26686
26722
  get relList(): DOMTokenList;
26687
26723
  set relList(value: string);
26688
26724
  /**
@@ -30431,6 +30467,31 @@ declare var SVGViewElement: {
30431
30467
  new(): SVGViewElement;
30432
30468
  };
30433
30469
 
30470
+ /**
30471
+ * The **`Scheduler`** interface of the Prioritized Task Scheduling API provides methods for scheduling prioritized tasks.
30472
+ *
30473
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler)
30474
+ */
30475
+ interface Scheduler {
30476
+ /**
30477
+ * The **`postTask()`** method of the Scheduler interface is used for adding tasks to be scheduled according to their priority.
30478
+ *
30479
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/postTask)
30480
+ */
30481
+ postTask(callback: SchedulerPostTaskCallback, options?: SchedulerPostTaskOptions): Promise<any>;
30482
+ /**
30483
+ * The **`yield()`** method of the Scheduler interface is used for yielding to the main thread during a task and continuing execution later, with the continuation scheduled as a prioritized task (see the Prioritized Task Scheduling API for more information).
30484
+ *
30485
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler/yield)
30486
+ */
30487
+ yield(): Promise<void>;
30488
+ }
30489
+
30490
+ declare var Scheduler: {
30491
+ prototype: Scheduler;
30492
+ new(): Scheduler;
30493
+ };
30494
+
30434
30495
  /**
30435
30496
  * The `Screen` interface represents a screen, usually the one on which the current window is being rendered, and is obtained using window.screen.
30436
30497
  *
@@ -32096,6 +32157,79 @@ declare var SubtleCrypto: {
32096
32157
  new(): SubtleCrypto;
32097
32158
  };
32098
32159
 
32160
+ /**
32161
+ * The **`TaskController`** interface of the Prioritized Task Scheduling API represents a controller object that can be used to both abort and change the priority of one or more prioritized tasks.
32162
+ *
32163
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController)
32164
+ */
32165
+ interface TaskController extends AbortController {
32166
+ /**
32167
+ * The **`setPriority()`** method of the TaskController interface can be called to set a new priority for this controller's `signal`.
32168
+ *
32169
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskController/setPriority)
32170
+ */
32171
+ setPriority(priority: TaskPriority): void;
32172
+ }
32173
+
32174
+ declare var TaskController: {
32175
+ prototype: TaskController;
32176
+ new(init?: TaskControllerInit): TaskController;
32177
+ };
32178
+
32179
+ /**
32180
+ * The **`TaskPriorityChangeEvent`** is the interface for the `prioritychange` event.
32181
+ *
32182
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent)
32183
+ */
32184
+ interface TaskPriorityChangeEvent extends Event {
32185
+ /**
32186
+ * The **`previousPriority`** read-only property of the TaskPriorityChangeEvent interface returns the priority of the corresponding TaskSignal before it was changed and this `prioritychange` event was emitted.
32187
+ *
32188
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskPriorityChangeEvent/previousPriority)
32189
+ */
32190
+ readonly previousPriority: TaskPriority;
32191
+ }
32192
+
32193
+ declare var TaskPriorityChangeEvent: {
32194
+ prototype: TaskPriorityChangeEvent;
32195
+ new(type: string, priorityChangeEventInitDict: TaskPriorityChangeEventInit): TaskPriorityChangeEvent;
32196
+ };
32197
+
32198
+ interface TaskSignalEventMap extends AbortSignalEventMap {
32199
+ "prioritychange": TaskPriorityChangeEvent;
32200
+ }
32201
+
32202
+ /**
32203
+ * The **`TaskSignal`** interface of the Prioritized Task Scheduling API represents a signal object that allows you to communicate with a prioritized task, and abort it or change the priority (if required) via a TaskController object.
32204
+ *
32205
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal)
32206
+ */
32207
+ interface TaskSignal extends AbortSignal {
32208
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/prioritychange_event) */
32209
+ onprioritychange: ((this: TaskSignal, ev: TaskPriorityChangeEvent) => any) | null;
32210
+ /**
32211
+ * The read-only **`priority`** property of the TaskSignal interface indicates the signal priority.
32212
+ *
32213
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/priority)
32214
+ */
32215
+ readonly priority: TaskPriority;
32216
+ addEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
32217
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
32218
+ removeEventListener<K extends keyof TaskSignalEventMap>(type: K, listener: (this: TaskSignal, ev: TaskSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
32219
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
32220
+ }
32221
+
32222
+ declare var TaskSignal: {
32223
+ prototype: TaskSignal;
32224
+ new(): TaskSignal;
32225
+ /**
32226
+ * The **`TaskSignal.any()`** static method takes an iterable of AbortSignal objects and returns a TaskSignal.
32227
+ *
32228
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/any_static)
32229
+ */
32230
+ any(signals: AbortSignal[], init?: TaskSignalAnyInit): TaskSignal;
32231
+ };
32232
+
32099
32233
  /**
32100
32234
  * The **`Text`** interface represents a text Node in a DOM tree.
32101
32235
  *
@@ -37379,6 +37513,8 @@ interface WindowOrWorkerGlobalScope {
37379
37513
  readonly origin: string;
37380
37514
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
37381
37515
  readonly performance: Performance;
37516
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
37517
+ readonly scheduler: Scheduler;
37382
37518
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
37383
37519
  atob(data: string): string;
37384
37520
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
@@ -38611,6 +38747,10 @@ interface ResizeObserverCallback {
38611
38747
  (entries: ResizeObserverEntry[], observer: ResizeObserver): void;
38612
38748
  }
38613
38749
 
38750
+ interface SchedulerPostTaskCallback {
38751
+ (): any;
38752
+ }
38753
+
38614
38754
  interface TransformerFlushCallback<O> {
38615
38755
  (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
38616
38756
  }
@@ -39664,6 +39804,8 @@ declare var isSecureContext: boolean;
39664
39804
  declare var origin: string;
39665
39805
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/performance) */
39666
39806
  declare var performance: Performance;
39807
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
39808
+ declare var scheduler: Scheduler;
39667
39809
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
39668
39810
  declare function atob(data: string): string;
39669
39811
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
@@ -39951,6 +40093,7 @@ type ShadowRootMode = "closed" | "open";
39951
40093
  type SlotAssignmentMode = "manual" | "named";
39952
40094
  type SpeechRecognitionErrorCode = "aborted" | "audio-capture" | "language-not-supported" | "network" | "no-speech" | "not-allowed" | "phrases-not-supported" | "service-not-allowed";
39953
40095
  type SpeechSynthesisErrorCode = "audio-busy" | "audio-hardware" | "canceled" | "interrupted" | "invalid-argument" | "language-unavailable" | "network" | "not-allowed" | "synthesis-failed" | "synthesis-unavailable" | "text-too-long" | "voice-unavailable";
40096
+ type TaskPriority = "background" | "user-blocking" | "user-visible";
39954
40097
  type TextTrackKind = "captions" | "chapters" | "descriptions" | "metadata" | "subtitles";
39955
40098
  type TextTrackMode = "disabled" | "hidden" | "showing";
39956
40099
  type TouchType = "direct" | "stylus";