@types/web 0.0.143 → 0.0.145

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.143 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.143.
50
+ You can read what changed in version 0.0.145 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.145.
package/index.d.ts CHANGED
@@ -4889,7 +4889,11 @@ interface CSSStyleDeclaration {
4889
4889
  * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/justify-content)
4890
4890
  */
4891
4891
  webkitJustifyContent: string;
4892
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp) */
4892
+ /**
4893
+ * @deprecated This is a legacy alias of `lineClamp`.
4894
+ *
4895
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp)
4896
+ */
4893
4897
  webkitLineClamp: string;
4894
4898
  /**
4895
4899
  * @deprecated This is a legacy alias of `mask`.
@@ -5551,6 +5555,8 @@ interface CanvasShadowStyles {
5551
5555
  }
5552
5556
 
5553
5557
  interface CanvasState {
5558
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isContextLost) */
5559
+ isContextLost(): boolean;
5554
5560
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/reset) */
5555
5561
  reset(): void;
5556
5562
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/restore) */
@@ -7265,6 +7271,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve
7265
7271
  createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
7266
7272
  createEvent(eventInterface: "StorageEvent"): StorageEvent;
7267
7273
  createEvent(eventInterface: "SubmitEvent"): SubmitEvent;
7274
+ createEvent(eventInterface: "TextEvent"): TextEvent;
7268
7275
  createEvent(eventInterface: "ToggleEvent"): ToggleEvent;
7269
7276
  createEvent(eventInterface: "TouchEvent"): TouchEvent;
7270
7277
  createEvent(eventInterface: "TrackEvent"): TrackEvent;
@@ -7701,7 +7708,7 @@ interface ElementEventMap {
7701
7708
  *
7702
7709
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element)
7703
7710
  */
7704
- interface Element extends Node, ARIAMixin, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slottable {
7711
+ interface Element extends Node, ARIAMixin, Animatable, ChildNode, NonDocumentTypeChildNode, ParentNode, Slottable {
7705
7712
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/attributes) */
7706
7713
  readonly attributes: NamedNodeMap;
7707
7714
  /**
@@ -7730,6 +7737,8 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, InnerHTML, Non
7730
7737
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/id)
7731
7738
  */
7732
7739
  id: string;
7740
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) */
7741
+ innerHTML: string;
7733
7742
  /**
7734
7743
  * Returns the local name.
7735
7744
  *
@@ -7869,7 +7878,7 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, InnerHTML, Non
7869
7878
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentElement) */
7870
7879
  insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
7871
7880
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentHTML) */
7872
- insertAdjacentHTML(position: InsertPosition, text: string): void;
7881
+ insertAdjacentHTML(position: InsertPosition, string: string): void;
7873
7882
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentText) */
7874
7883
  insertAdjacentText(where: InsertPosition, data: string): void;
7875
7884
  /**
@@ -7960,6 +7969,7 @@ declare var Element: {
7960
7969
  };
7961
7970
 
7962
7971
  interface ElementCSSInlineStyle {
7972
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/attributeStyleMap) */
7963
7973
  readonly attributeStyleMap: StylePropertyMap;
7964
7974
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/style) */
7965
7975
  readonly style: CSSStyleDeclaration;
@@ -8959,7 +8969,9 @@ interface GlobalEventHandlersEventMap {
8959
8969
  "compositionend": CompositionEvent;
8960
8970
  "compositionstart": CompositionEvent;
8961
8971
  "compositionupdate": CompositionEvent;
8972
+ "contextlost": Event;
8962
8973
  "contextmenu": MouseEvent;
8974
+ "contextrestored": Event;
8963
8975
  "copy": ClipboardEvent;
8964
8976
  "cuechange": Event;
8965
8977
  "cut": ClipboardEvent;
@@ -9100,6 +9112,8 @@ interface GlobalEventHandlers {
9100
9112
  onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
9101
9113
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDialogElement/close_event) */
9102
9114
  onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
9115
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/webglcontextlost_event) */
9116
+ oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
9103
9117
  /**
9104
9118
  * Fires when the user clicks the right mouse button in the client area, opening the context menu.
9105
9119
  * @param ev The mouse event.
@@ -9107,6 +9121,8 @@ interface GlobalEventHandlers {
9107
9121
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/contextmenu_event)
9108
9122
  */
9109
9123
  oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
9124
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/contextrestored_event) */
9125
+ oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
9110
9126
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/copy_event) */
9111
9127
  oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
9112
9128
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTrackElement/cuechange_event) */
@@ -10816,6 +10832,7 @@ interface HTMLIFrameElement extends HTMLElement {
10816
10832
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/align)
10817
10833
  */
10818
10834
  align: string;
10835
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/allow) */
10819
10836
  allow: string;
10820
10837
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/allowFullscreen) */
10821
10838
  allowFullscreen: boolean;
@@ -10875,6 +10892,7 @@ interface HTMLIFrameElement extends HTMLElement {
10875
10892
  name: string;
10876
10893
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/referrerPolicy) */
10877
10894
  referrerPolicy: ReferrerPolicy;
10895
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement/sandbox) */
10878
10896
  readonly sandbox: DOMTokenList;
10879
10897
  /**
10880
10898
  * Sets or retrieves whether the frame can be scrolled.
@@ -11431,6 +11449,7 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle {
11431
11449
  hreflang: string;
11432
11450
  imageSizes: string;
11433
11451
  imageSrcset: string;
11452
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/integrity) */
11434
11453
  integrity: string;
11435
11454
  /** Sets or retrieves the media type. */
11436
11455
  media: string;
@@ -11456,7 +11475,11 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle {
11456
11475
  * @deprecated
11457
11476
  */
11458
11477
  target: string;
11459
- /** Sets or retrieves the MIME type of the object. */
11478
+ /**
11479
+ * Sets or retrieves the MIME type of the object.
11480
+ *
11481
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/type)
11482
+ */
11460
11483
  type: string;
11461
11484
  addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLinkElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
11462
11485
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -12480,6 +12503,7 @@ declare var HTMLQuoteElement: {
12480
12503
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement)
12481
12504
  */
12482
12505
  interface HTMLScriptElement extends HTMLElement {
12506
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/async) */
12483
12507
  async: boolean;
12484
12508
  /**
12485
12509
  * Sets or retrieves the character set used to encode the object.
@@ -12488,28 +12512,47 @@ interface HTMLScriptElement extends HTMLElement {
12488
12512
  charset: string;
12489
12513
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/crossOrigin) */
12490
12514
  crossOrigin: string | null;
12491
- /** Sets or retrieves the status of the script. */
12515
+ /**
12516
+ * Sets or retrieves the status of the script.
12517
+ *
12518
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/defer)
12519
+ */
12492
12520
  defer: boolean;
12493
12521
  /**
12494
12522
  * Sets or retrieves the event for which the script is written.
12495
12523
  * @deprecated
12496
12524
  */
12497
12525
  event: string;
12526
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/fetchPriority) */
12498
12527
  fetchPriority: string;
12499
12528
  /**
12500
12529
  * Sets or retrieves the object that is bound to the event script.
12501
12530
  * @deprecated
12502
12531
  */
12503
12532
  htmlFor: string;
12533
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/integrity) */
12504
12534
  integrity: string;
12535
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/noModule) */
12505
12536
  noModule: boolean;
12506
12537
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/referrerPolicy) */
12507
12538
  referrerPolicy: string;
12508
- /** Retrieves the URL to an external file that contains the source code or data. */
12539
+ /**
12540
+ * Retrieves the URL to an external file that contains the source code or data.
12541
+ *
12542
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/src)
12543
+ */
12509
12544
  src: string;
12510
- /** Retrieves or sets the text of the object as a string. */
12545
+ /**
12546
+ * Retrieves or sets the text of the object as a string.
12547
+ *
12548
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/text)
12549
+ */
12511
12550
  text: string;
12512
- /** Sets or retrieves the MIME type for the associated scripting engine. */
12551
+ /**
12552
+ * Sets or retrieves the MIME type for the associated scripting engine.
12553
+ *
12554
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/type)
12555
+ */
12513
12556
  type: string;
12514
12557
  addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLScriptElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
12515
12558
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -13319,6 +13362,11 @@ interface HTMLTemplateElement extends HTMLElement {
13319
13362
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/content)
13320
13363
  */
13321
13364
  readonly content: DocumentFragment;
13365
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootClonable) */
13366
+ shadowRootClonable: boolean;
13367
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootDelegatesFocus) */
13368
+ shadowRootDelegatesFocus: boolean;
13369
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootMode) */
13322
13370
  shadowRootMode: string;
13323
13371
  addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
13324
13372
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -14505,11 +14553,6 @@ declare var ImageData: {
14505
14553
  new(data: Uint8ClampedArray, sw: number, sh?: number, settings?: ImageDataSettings): ImageData;
14506
14554
  };
14507
14555
 
14508
- interface InnerHTML {
14509
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/innerHTML) */
14510
- innerHTML: string;
14511
- }
14512
-
14513
14556
  /**
14514
14557
  * Available only in secure contexts.
14515
14558
  *
@@ -16898,8 +16941,6 @@ declare var OffscreenCanvas: {
16898
16941
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvasRenderingContext2D) */
16899
16942
  interface OffscreenCanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform {
16900
16943
  readonly canvas: OffscreenCanvas;
16901
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvasRenderingContext2D/commit) */
16902
- commit(): void;
16903
16944
  }
16904
16945
 
16905
16946
  declare var OffscreenCanvasRenderingContext2D: {
@@ -18499,6 +18540,7 @@ declare var RTCPeerConnectionIceEvent: {
18499
18540
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpReceiver)
18500
18541
  */
18501
18542
  interface RTCRtpReceiver {
18543
+ jitterBufferTarget: DOMHighResTimeStamp | null;
18502
18544
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpReceiver/track) */
18503
18545
  readonly track: MediaStreamTrack;
18504
18546
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpReceiver/transform) */
@@ -18577,7 +18619,7 @@ interface RTCRtpTransceiver {
18577
18619
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpTransceiver/sender) */
18578
18620
  readonly sender: RTCRtpSender;
18579
18621
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpTransceiver/setCodecPreferences) */
18580
- setCodecPreferences(codecs: RTCRtpCodecCapability[]): void;
18622
+ setCodecPreferences(codecs: RTCRtpCodec[]): void;
18581
18623
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpTransceiver/stop) */
18582
18624
  stop(): void;
18583
18625
  }
@@ -18697,7 +18739,7 @@ interface Range extends AbstractRange {
18697
18739
  */
18698
18740
  comparePoint(node: Node, offset: number): number;
18699
18741
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Range/createContextualFragment) */
18700
- createContextualFragment(fragment: string): DocumentFragment;
18742
+ createContextualFragment(string: string): DocumentFragment;
18701
18743
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Range/deleteContents) */
18702
18744
  deleteContents(): void;
18703
18745
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Range/detach) */
@@ -21371,6 +21413,7 @@ interface Selection {
21371
21413
  readonly anchorNode: Node | null;
21372
21414
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Selection/anchorOffset) */
21373
21415
  readonly anchorOffset: number;
21416
+ readonly direction: string;
21374
21417
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Selection/focusNode) */
21375
21418
  readonly focusNode: Node | null;
21376
21419
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Selection/focusOffset) */
@@ -21543,13 +21586,15 @@ interface ShadowRootEventMap {
21543
21586
  }
21544
21587
 
21545
21588
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ShadowRoot) */
21546
- interface ShadowRoot extends DocumentFragment, DocumentOrShadowRoot, InnerHTML {
21589
+ interface ShadowRoot extends DocumentFragment, DocumentOrShadowRoot {
21547
21590
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ShadowRoot/clonable) */
21548
21591
  readonly clonable: boolean;
21549
21592
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ShadowRoot/delegatesFocus) */
21550
21593
  readonly delegatesFocus: boolean;
21551
21594
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ShadowRoot/host) */
21552
21595
  readonly host: Element;
21596
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ShadowRoot/innerHTML) */
21597
+ innerHTML: string;
21553
21598
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ShadowRoot/mode) */
21554
21599
  readonly mode: ShadowRootMode;
21555
21600
  onslotchange: ((this: ShadowRoot, ev: Event) => any) | null;
@@ -22296,6 +22341,16 @@ declare var TextEncoderStream: {
22296
22341
  new(): TextEncoderStream;
22297
22342
  };
22298
22343
 
22344
+ interface TextEvent extends UIEvent {
22345
+ readonly data: string;
22346
+ initTextEvent(type: string, bubbles?: boolean, cancelable?: boolean, view?: Window | null, data?: string): void;
22347
+ }
22348
+
22349
+ declare var TextEvent: {
22350
+ prototype: TextEvent;
22351
+ new(): TextEvent;
22352
+ };
22353
+
22299
22354
  /**
22300
22355
  * The dimensions of a piece of text in the canvas, as created by the CanvasRenderingContext2D.measureText() method.
22301
22356
  *
@@ -27857,6 +27912,8 @@ declare var onchange: ((this: Window, ev: Event) => any) | null;
27857
27912
  declare var onclick: ((this: Window, ev: MouseEvent) => any) | null;
27858
27913
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDialogElement/close_event) */
27859
27914
  declare var onclose: ((this: Window, ev: Event) => any) | null;
27915
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/webglcontextlost_event) */
27916
+ declare var oncontextlost: ((this: Window, ev: Event) => any) | null;
27860
27917
  /**
27861
27918
  * Fires when the user clicks the right mouse button in the client area, opening the context menu.
27862
27919
  * @param ev The mouse event.
@@ -27864,6 +27921,8 @@ declare var onclose: ((this: Window, ev: Event) => any) | null;
27864
27921
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/contextmenu_event)
27865
27922
  */
27866
27923
  declare var oncontextmenu: ((this: Window, ev: MouseEvent) => any) | null;
27924
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/contextrestored_event) */
27925
+ declare var oncontextrestored: ((this: Window, ev: Event) => any) | null;
27867
27926
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/copy_event) */
27868
27927
  declare var oncopy: ((this: Window, ev: ClipboardEvent) => any) | null;
27869
27928
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTrackElement/cuechange_event) */
package/iterable.d.ts CHANGED
@@ -248,7 +248,7 @@ interface PluginArray {
248
248
 
249
249
  interface RTCRtpTransceiver {
250
250
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpTransceiver/setCodecPreferences) */
251
- setCodecPreferences(codecs: Iterable<RTCRtpCodecCapability>): void;
251
+ setCodecPreferences(codecs: Iterable<RTCRtpCodec>): void;
252
252
  }
253
253
 
254
254
  interface RTCStatsReport extends ReadonlyMap<string, any> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/web",
3
- "version": "0.0.143",
3
+ "version": "0.0.145",
4
4
  "description": "Types for the DOM, and other web technologies in browsers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],