@types/web 0.0.349 → 0.0.350

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
@@ -49,4 +49,4 @@ Prior to `@types/web` the web APIs were deployed with a version of TypeScript, a
49
49
 
50
50
  ## Deploy Metadata
51
51
 
52
- You can read what changed in version 0.0.349 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.349.
52
+ You can read what changed in version 0.0.350 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.350.
package/index.d.ts CHANGED
@@ -2754,6 +2754,10 @@ interface SerialPortRequestOptions {
2754
2754
  filters?: SerialPortFilter[];
2755
2755
  }
2756
2756
 
2757
+ interface SetHTMLOptions {
2758
+ sanitizer?: Sanitizer | SanitizerConfig | SanitizerPresets;
2759
+ }
2760
+
2757
2761
  interface ShadowRootInit {
2758
2762
  clonable?: boolean;
2759
2763
  customElementRegistry?: CustomElementRegistry | null;
@@ -14145,6 +14149,12 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, NonDocumentTyp
14145
14149
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNodeNS)
14146
14150
  */
14147
14151
  setAttributeNodeNS(attr: Attr): Attr | null;
14152
+ /**
14153
+ * The **`setHTML()`** method of the Element interface provides an XSS-safe method to parse and sanitize a string of HTML and insert it into the DOM as a subtree of the element.
14154
+ *
14155
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setHTML)
14156
+ */
14157
+ setHTML(html: string, options?: SetHTMLOptions): void;
14148
14158
  /**
14149
14159
  * The **`setHTMLUnsafe()`** method of the Element interface is used to parse HTML input into a DocumentFragment, optionally filtering out unwanted elements and attributes, and those that don't belong in the context, and then using it to replace the element's subtree in the DOM.
14150
14160
  *
@@ -17990,7 +18000,7 @@ interface HTMLElementEventMap extends ElementEventMap, GlobalEventHandlersEventM
17990
18000
  *
17991
18001
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement)
17992
18002
  */
17993
- interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEditable, GlobalEventHandlers, HTMLOrSVGElement {
18003
+ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEditable, GlobalEventHandlers, HTMLOrSVGElement, HTMLOrSVGOrMathMLElement {
17994
18004
  /**
17995
18005
  * The **`HTMLElement.accessKey`** property sets the keystroke which a user can press to jump to a given element.
17996
18006
  *
@@ -20315,7 +20325,10 @@ declare var HTMLOptionsCollection: {
20315
20325
  new(): HTMLOptionsCollection;
20316
20326
  };
20317
20327
 
20318
- interface HTMLOrSVGElement {
20328
+ interface HTMLOrSVGElement extends HTMLOrSVGOrMathMLElement {
20329
+ }
20330
+
20331
+ interface HTMLOrSVGOrMathMLElement {
20319
20332
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/autofocus) */
20320
20333
  autofocus: boolean;
20321
20334
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/dataset) */
@@ -24039,7 +24052,7 @@ interface MathMLElementEventMap extends ElementEventMap, GlobalEventHandlersEven
24039
24052
  *
24040
24053
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MathMLElement)
24041
24054
  */
24042
- interface MathMLElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement {
24055
+ interface MathMLElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGOrMathMLElement {
24043
24056
  addEventListener<K extends keyof MathMLElementEventMap>(type: K, listener: (this: MathMLElement, ev: MathMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
24044
24057
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
24045
24058
  removeEventListener<K extends keyof MathMLElementEventMap>(type: K, listener: (this: MathMLElement, ev: MathMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@@ -26036,6 +26049,7 @@ declare var NavigationPreloadManager: {
26036
26049
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationTransition)
26037
26050
  */
26038
26051
  interface NavigationTransition {
26052
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationTransition/committed) */
26039
26053
  readonly committed: Promise<void>;
26040
26054
  /**
26041
26055
  * The **`finished`** read-only property of the NavigationTransition interface returns a Promise that fulfills at the same time the navigatesuccess event fires, or rejects at the same time the navigateerror event fires.
@@ -31831,7 +31845,7 @@ interface SVGElementEventMap extends ElementEventMap, GlobalEventHandlersEventMa
31831
31845
  *
31832
31846
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGElement)
31833
31847
  */
31834
- interface SVGElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement {
31848
+ interface SVGElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement, HTMLOrSVGOrMathMLElement {
31835
31849
  /** @deprecated */
31836
31850
  readonly className: any;
31837
31851
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/web",
3
- "version": "0.0.349",
3
+ "version": "0.0.350",
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
@@ -2751,6 +2751,10 @@ interface SerialPortRequestOptions {
2751
2751
  filters?: SerialPortFilter[];
2752
2752
  }
2753
2753
 
2754
+ interface SetHTMLOptions {
2755
+ sanitizer?: Sanitizer | SanitizerConfig | SanitizerPresets;
2756
+ }
2757
+
2754
2758
  interface ShadowRootInit {
2755
2759
  clonable?: boolean;
2756
2760
  customElementRegistry?: CustomElementRegistry | null;
@@ -14132,6 +14136,12 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, NonDocumentTyp
14132
14136
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNodeNS)
14133
14137
  */
14134
14138
  setAttributeNodeNS(attr: Attr): Attr | null;
14139
+ /**
14140
+ * The **`setHTML()`** method of the Element interface provides an XSS-safe method to parse and sanitize a string of HTML and insert it into the DOM as a subtree of the element.
14141
+ *
14142
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setHTML)
14143
+ */
14144
+ setHTML(html: string, options?: SetHTMLOptions): void;
14135
14145
  /**
14136
14146
  * The **`setHTMLUnsafe()`** method of the Element interface is used to parse HTML input into a DocumentFragment, optionally filtering out unwanted elements and attributes, and those that don't belong in the context, and then using it to replace the element's subtree in the DOM.
14137
14147
  *
@@ -17974,7 +17984,7 @@ interface HTMLElementEventMap extends ElementEventMap, GlobalEventHandlersEventM
17974
17984
  *
17975
17985
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement)
17976
17986
  */
17977
- interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEditable, GlobalEventHandlers, HTMLOrSVGElement {
17987
+ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEditable, GlobalEventHandlers, HTMLOrSVGElement, HTMLOrSVGOrMathMLElement {
17978
17988
  /**
17979
17989
  * The **`HTMLElement.accessKey`** property sets the keystroke which a user can press to jump to a given element.
17980
17990
  *
@@ -20294,7 +20304,10 @@ declare var HTMLOptionsCollection: {
20294
20304
  new(): HTMLOptionsCollection;
20295
20305
  };
20296
20306
 
20297
- interface HTMLOrSVGElement {
20307
+ interface HTMLOrSVGElement extends HTMLOrSVGOrMathMLElement {
20308
+ }
20309
+
20310
+ interface HTMLOrSVGOrMathMLElement {
20298
20311
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/autofocus) */
20299
20312
  autofocus: boolean;
20300
20313
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/dataset) */
@@ -24015,7 +24028,7 @@ interface MathMLElementEventMap extends ElementEventMap, GlobalEventHandlersEven
24015
24028
  *
24016
24029
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MathMLElement)
24017
24030
  */
24018
- interface MathMLElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement {
24031
+ interface MathMLElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGOrMathMLElement {
24019
24032
  addEventListener<K extends keyof MathMLElementEventMap>(type: K, listener: (this: MathMLElement, ev: MathMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
24020
24033
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
24021
24034
  removeEventListener<K extends keyof MathMLElementEventMap>(type: K, listener: (this: MathMLElement, ev: MathMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@@ -26012,6 +26025,7 @@ declare var NavigationPreloadManager: {
26012
26025
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationTransition)
26013
26026
  */
26014
26027
  interface NavigationTransition {
26028
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationTransition/committed) */
26015
26029
  readonly committed: Promise<void>;
26016
26030
  /**
26017
26031
  * The **`finished`** read-only property of the NavigationTransition interface returns a Promise that fulfills at the same time the navigatesuccess event fires, or rejects at the same time the navigateerror event fires.
@@ -31806,7 +31820,7 @@ interface SVGElementEventMap extends ElementEventMap, GlobalEventHandlersEventMa
31806
31820
  *
31807
31821
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGElement)
31808
31822
  */
31809
- interface SVGElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement {
31823
+ interface SVGElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement, HTMLOrSVGOrMathMLElement {
31810
31824
  /** @deprecated */
31811
31825
  readonly className: any;
31812
31826
  /**
package/ts5.6/index.d.ts CHANGED
@@ -2751,6 +2751,10 @@ interface SerialPortRequestOptions {
2751
2751
  filters?: SerialPortFilter[];
2752
2752
  }
2753
2753
 
2754
+ interface SetHTMLOptions {
2755
+ sanitizer?: Sanitizer | SanitizerConfig | SanitizerPresets;
2756
+ }
2757
+
2754
2758
  interface ShadowRootInit {
2755
2759
  clonable?: boolean;
2756
2760
  customElementRegistry?: CustomElementRegistry | null;
@@ -14142,6 +14146,12 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, NonDocumentTyp
14142
14146
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNodeNS)
14143
14147
  */
14144
14148
  setAttributeNodeNS(attr: Attr): Attr | null;
14149
+ /**
14150
+ * The **`setHTML()`** method of the Element interface provides an XSS-safe method to parse and sanitize a string of HTML and insert it into the DOM as a subtree of the element.
14151
+ *
14152
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setHTML)
14153
+ */
14154
+ setHTML(html: string, options?: SetHTMLOptions): void;
14145
14155
  /**
14146
14156
  * The **`setHTMLUnsafe()`** method of the Element interface is used to parse HTML input into a DocumentFragment, optionally filtering out unwanted elements and attributes, and those that don't belong in the context, and then using it to replace the element's subtree in the DOM.
14147
14157
  *
@@ -17987,7 +17997,7 @@ interface HTMLElementEventMap extends ElementEventMap, GlobalEventHandlersEventM
17987
17997
  *
17988
17998
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement)
17989
17999
  */
17990
- interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEditable, GlobalEventHandlers, HTMLOrSVGElement {
18000
+ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEditable, GlobalEventHandlers, HTMLOrSVGElement, HTMLOrSVGOrMathMLElement {
17991
18001
  /**
17992
18002
  * The **`HTMLElement.accessKey`** property sets the keystroke which a user can press to jump to a given element.
17993
18003
  *
@@ -20312,7 +20322,10 @@ declare var HTMLOptionsCollection: {
20312
20322
  new(): HTMLOptionsCollection;
20313
20323
  };
20314
20324
 
20315
- interface HTMLOrSVGElement {
20325
+ interface HTMLOrSVGElement extends HTMLOrSVGOrMathMLElement {
20326
+ }
20327
+
20328
+ interface HTMLOrSVGOrMathMLElement {
20316
20329
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/autofocus) */
20317
20330
  autofocus: boolean;
20318
20331
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/dataset) */
@@ -24036,7 +24049,7 @@ interface MathMLElementEventMap extends ElementEventMap, GlobalEventHandlersEven
24036
24049
  *
24037
24050
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MathMLElement)
24038
24051
  */
24039
- interface MathMLElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement {
24052
+ interface MathMLElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGOrMathMLElement {
24040
24053
  addEventListener<K extends keyof MathMLElementEventMap>(type: K, listener: (this: MathMLElement, ev: MathMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
24041
24054
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
24042
24055
  removeEventListener<K extends keyof MathMLElementEventMap>(type: K, listener: (this: MathMLElement, ev: MathMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@@ -26033,6 +26046,7 @@ declare var NavigationPreloadManager: {
26033
26046
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationTransition)
26034
26047
  */
26035
26048
  interface NavigationTransition {
26049
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationTransition/committed) */
26036
26050
  readonly committed: Promise<void>;
26037
26051
  /**
26038
26052
  * The **`finished`** read-only property of the NavigationTransition interface returns a Promise that fulfills at the same time the navigatesuccess event fires, or rejects at the same time the navigateerror event fires.
@@ -31828,7 +31842,7 @@ interface SVGElementEventMap extends ElementEventMap, GlobalEventHandlersEventMa
31828
31842
  *
31829
31843
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGElement)
31830
31844
  */
31831
- interface SVGElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement {
31845
+ interface SVGElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement, HTMLOrSVGOrMathMLElement {
31832
31846
  /** @deprecated */
31833
31847
  readonly className: any;
31834
31848
  /**
package/ts5.9/index.d.ts CHANGED
@@ -2751,6 +2751,10 @@ interface SerialPortRequestOptions {
2751
2751
  filters?: SerialPortFilter[];
2752
2752
  }
2753
2753
 
2754
+ interface SetHTMLOptions {
2755
+ sanitizer?: Sanitizer | SanitizerConfig | SanitizerPresets;
2756
+ }
2757
+
2754
2758
  interface ShadowRootInit {
2755
2759
  clonable?: boolean;
2756
2760
  customElementRegistry?: CustomElementRegistry | null;
@@ -14142,6 +14146,12 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, NonDocumentTyp
14142
14146
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNodeNS)
14143
14147
  */
14144
14148
  setAttributeNodeNS(attr: Attr): Attr | null;
14149
+ /**
14150
+ * The **`setHTML()`** method of the Element interface provides an XSS-safe method to parse and sanitize a string of HTML and insert it into the DOM as a subtree of the element.
14151
+ *
14152
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/setHTML)
14153
+ */
14154
+ setHTML(html: string, options?: SetHTMLOptions): void;
14145
14155
  /**
14146
14156
  * The **`setHTMLUnsafe()`** method of the Element interface is used to parse HTML input into a DocumentFragment, optionally filtering out unwanted elements and attributes, and those that don't belong in the context, and then using it to replace the element's subtree in the DOM.
14147
14157
  *
@@ -17987,7 +17997,7 @@ interface HTMLElementEventMap extends ElementEventMap, GlobalEventHandlersEventM
17987
17997
  *
17988
17998
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement)
17989
17999
  */
17990
- interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEditable, GlobalEventHandlers, HTMLOrSVGElement {
18000
+ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEditable, GlobalEventHandlers, HTMLOrSVGElement, HTMLOrSVGOrMathMLElement {
17991
18001
  /**
17992
18002
  * The **`HTMLElement.accessKey`** property sets the keystroke which a user can press to jump to a given element.
17993
18003
  *
@@ -20312,7 +20322,10 @@ declare var HTMLOptionsCollection: {
20312
20322
  new(): HTMLOptionsCollection;
20313
20323
  };
20314
20324
 
20315
- interface HTMLOrSVGElement {
20325
+ interface HTMLOrSVGElement extends HTMLOrSVGOrMathMLElement {
20326
+ }
20327
+
20328
+ interface HTMLOrSVGOrMathMLElement {
20316
20329
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/autofocus) */
20317
20330
  autofocus: boolean;
20318
20331
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/dataset) */
@@ -24036,7 +24049,7 @@ interface MathMLElementEventMap extends ElementEventMap, GlobalEventHandlersEven
24036
24049
  *
24037
24050
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MathMLElement)
24038
24051
  */
24039
- interface MathMLElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement {
24052
+ interface MathMLElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGOrMathMLElement {
24040
24053
  addEventListener<K extends keyof MathMLElementEventMap>(type: K, listener: (this: MathMLElement, ev: MathMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
24041
24054
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
24042
24055
  removeEventListener<K extends keyof MathMLElementEventMap>(type: K, listener: (this: MathMLElement, ev: MathMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@@ -26033,6 +26046,7 @@ declare var NavigationPreloadManager: {
26033
26046
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationTransition)
26034
26047
  */
26035
26048
  interface NavigationTransition {
26049
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationTransition/committed) */
26036
26050
  readonly committed: Promise<void>;
26037
26051
  /**
26038
26052
  * The **`finished`** read-only property of the NavigationTransition interface returns a Promise that fulfills at the same time the navigatesuccess event fires, or rejects at the same time the navigateerror event fires.
@@ -31828,7 +31842,7 @@ interface SVGElementEventMap extends ElementEventMap, GlobalEventHandlersEventMa
31828
31842
  *
31829
31843
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGElement)
31830
31844
  */
31831
- interface SVGElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement {
31845
+ interface SVGElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement, HTMLOrSVGOrMathMLElement {
31832
31846
  /** @deprecated */
31833
31847
  readonly className: any;
31834
31848
  /**