@types/web 0.0.337 → 0.0.339

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/ts5.9/index.d.ts CHANGED
@@ -408,6 +408,10 @@ interface CloseEventInit extends EventInit {
408
408
  wasClean?: boolean;
409
409
  }
410
410
 
411
+ interface CloseWatcherOptions {
412
+ signal?: AbortSignal;
413
+ }
414
+
411
415
  interface CommandEventInit extends EventInit {
412
416
  command?: string;
413
417
  source?: Element | null;
@@ -1182,7 +1186,7 @@ interface GamepadEffectParameters {
1182
1186
  }
1183
1187
 
1184
1188
  interface GamepadEventInit extends EventInit {
1185
- gamepad: Gamepad;
1189
+ gamepad?: Gamepad | null;
1186
1190
  }
1187
1191
 
1188
1192
  interface GetAnimationsOptions {
@@ -3118,6 +3122,23 @@ interface WebTransportCloseInfo {
3118
3122
  reason?: string;
3119
3123
  }
3120
3124
 
3125
+ interface WebTransportConnectionStats {
3126
+ bytesReceived?: number;
3127
+ datagrams: WebTransportDatagramStats;
3128
+ minRtt?: DOMHighResTimeStamp;
3129
+ packetsLost?: number;
3130
+ packetsReceived?: number;
3131
+ packetsSent?: number;
3132
+ rttVariation?: DOMHighResTimeStamp;
3133
+ smoothedRtt?: DOMHighResTimeStamp;
3134
+ }
3135
+
3136
+ interface WebTransportDatagramStats {
3137
+ droppedIncoming?: number;
3138
+ expiredOutgoing?: number;
3139
+ lostOutgoing?: number;
3140
+ }
3141
+
3121
3142
  interface WebTransportErrorOptions {
3122
3143
  source?: WebTransportErrorSource;
3123
3144
  streamErrorCode?: number | null;
@@ -3136,6 +3157,11 @@ interface WebTransportOptions {
3136
3157
  serverCertificateHashes?: WebTransportHash[];
3137
3158
  }
3138
3159
 
3160
+ interface WebTransportReceiveStreamStats {
3161
+ bytesRead?: number;
3162
+ bytesReceived?: number;
3163
+ }
3164
+
3139
3165
  interface WebTransportSendOptions {
3140
3166
  sendOrder?: number;
3141
3167
  }
@@ -3143,6 +3169,12 @@ interface WebTransportSendOptions {
3143
3169
  interface WebTransportSendStreamOptions extends WebTransportSendOptions {
3144
3170
  }
3145
3171
 
3172
+ interface WebTransportSendStreamStats {
3173
+ bytesAcknowledged?: number;
3174
+ bytesSent?: number;
3175
+ bytesWritten?: number;
3176
+ }
3177
+
3146
3178
  interface WheelEventInit extends MouseEventInit {
3147
3179
  deltaMode?: number;
3148
3180
  deltaX?: number;
@@ -5358,7 +5390,7 @@ declare var CSSFontFaceRule: {
5358
5390
  };
5359
5391
 
5360
5392
  /**
5361
- * The **`CSSFontFeatureValuesRule`** interface represents an @font-feature-values at-rule. The values of its instance properties can be accessed with the CSSFontFeatureValuesMapinterface.
5393
+ * The **`CSSFontFeatureValuesRule`** interface represents an @font-feature-values at-rule. The values of its instance properties can be accessed with the CSSFontFeatureValuesMap interface.
5362
5394
  *
5363
5395
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSFontFeatureValuesRule)
5364
5396
  */
@@ -6815,7 +6847,11 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase {
6815
6847
  * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/background-size)
6816
6848
  */
6817
6849
  backgroundSize: string;
6818
- /** The baseline-shift CSS property repositions the dominant-baseline of a text element relative to the dominant-baseline of its parent text content element. The shifted element might be a sub- or superscript. If the property is present, the value overrides the element's baseline-shift attribute. */
6850
+ /**
6851
+ * The baseline-shift CSS property repositions the dominant-baseline of a text element relative to the dominant-baseline of its parent text content element. The shifted element might be a sub- or superscript. If the property is present, the value overrides the element's baseline-shift attribute.
6852
+ *
6853
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/baseline-shift)
6854
+ */
6819
6855
  baselineShift: string;
6820
6856
  /**
6821
6857
  * The baseline-source CSS property defines which baseline to use when inline-level boxes have multiple possible baselines, such as multi-line inline blocks or inline flex containers. The values allow for choosing between aligning to the box's first baseline, last baseline, or letting the browser decide automatically based on the box type.
@@ -10793,6 +10829,50 @@ declare var CloseEvent: {
10793
10829
  new(type: string, eventInitDict?: CloseEventInit): CloseEvent;
10794
10830
  };
10795
10831
 
10832
+ interface CloseWatcherEventMap {
10833
+ "cancel": Event;
10834
+ "close": Event;
10835
+ }
10836
+
10837
+ /**
10838
+ * The **`CloseWatcher`** interface allows a custom UI component with open and close semantics to respond to device-specific close actions in the same way as a built-in component.
10839
+ *
10840
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseWatcher)
10841
+ */
10842
+ interface CloseWatcher extends EventTarget {
10843
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseWatcher/cancel_event) */
10844
+ oncancel: ((this: CloseWatcher, ev: Event) => any) | null;
10845
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseWatcher/close_event) */
10846
+ onclose: ((this: CloseWatcher, ev: Event) => any) | null;
10847
+ /**
10848
+ * The **`close()`** method of the CloseWatcher interface lets you skip any logic in the cancel event handler and immediately fire the close event. It then deactivates the close watcher as if destroy() was called.
10849
+ *
10850
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseWatcher/close)
10851
+ */
10852
+ close(): void;
10853
+ /**
10854
+ * The **`destroy()`** method of the CloseWatcher interface deactivates the close watcher. This is intended to be called if the relevant UI element is torn down in some other way than being closed.
10855
+ *
10856
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseWatcher/destroy)
10857
+ */
10858
+ destroy(): void;
10859
+ /**
10860
+ * The **`requestClose()`** method of the CloseWatcher interface fires a cancel event and if that event is not canceled with Event.preventDefault(), proceeds to fire a close event, and then finally deactivates the close watcher as if destroy() was called.
10861
+ *
10862
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseWatcher/requestClose)
10863
+ */
10864
+ requestClose(): void;
10865
+ addEventListener<K extends keyof CloseWatcherEventMap>(type: K, listener: (this: CloseWatcher, ev: CloseWatcherEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
10866
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
10867
+ removeEventListener<K extends keyof CloseWatcherEventMap>(type: K, listener: (this: CloseWatcher, ev: CloseWatcherEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
10868
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
10869
+ }
10870
+
10871
+ declare var CloseWatcher: {
10872
+ prototype: CloseWatcher;
10873
+ new(options?: CloseWatcherOptions): CloseWatcher;
10874
+ };
10875
+
10796
10876
  /**
10797
10877
  * The **`CommandEvent`** interface represents an event notifying the user when a button element with valid commandForElement and command attributes is about to invoke an interactive element.
10798
10878
  *
@@ -11231,6 +11311,7 @@ interface CustomElementRegistry {
11231
11311
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry/getName)
11232
11312
  */
11233
11313
  getName(constructor: CustomElementConstructor): string | null;
11314
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry/initialize) */
11234
11315
  initialize(root: Node): void;
11235
11316
  /**
11236
11317
  * The **`upgrade()`** method of the CustomElementRegistry interface upgrades all shadow-containing custom elements in a Node subtree, even before they are connected to the main document.
@@ -13229,6 +13310,7 @@ interface DocumentOrShadowRoot {
13229
13310
  readonly activeElement: Element | null;
13230
13311
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/adoptedStyleSheets) */
13231
13312
  adoptedStyleSheets: CSSStyleSheet[];
13313
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/customElementRegistry) */
13232
13314
  readonly customElementRegistry: CustomElementRegistry | null;
13233
13315
  /**
13234
13316
  * Returns document's fullscreen element.
@@ -13539,6 +13621,7 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, NonDocumentTyp
13539
13621
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom)
13540
13622
  */
13541
13623
  readonly currentCSSZoom: number;
13624
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/customElementRegistry) */
13542
13625
  readonly customElementRegistry: CustomElementRegistry | null;
13543
13626
  /**
13544
13627
  * The **`id`** property of the Element interface represents the element's identifier, reflecting the id global attribute.
@@ -16443,7 +16526,7 @@ interface GamepadEvent extends Event {
16443
16526
 
16444
16527
  declare var GamepadEvent: {
16445
16528
  prototype: GamepadEvent;
16446
- new(type: string, eventInitDict: GamepadEventInit): GamepadEvent;
16529
+ new(type: string, eventInitDict?: GamepadEventInit): GamepadEvent;
16447
16530
  };
16448
16531
 
16449
16532
  /**
@@ -18763,6 +18846,12 @@ interface HTMLInputElement extends HTMLElement, PopoverTargetAttributes {
18763
18846
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/checked)
18764
18847
  */
18765
18848
  checked: boolean;
18849
+ /**
18850
+ * The **`colorSpace`** property of the HTMLInputElement interface reflects the <input> element's colorspace attribute, which indicates whether the color space of the serialized CSS color is sRGB (the default) or display-p3. It is only relevant to color controls.
18851
+ *
18852
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/colorSpace)
18853
+ */
18854
+ colorSpace: string;
18766
18855
  /**
18767
18856
  * The **`defaultChecked`** property of the HTMLInputElement interface specifies the default checkedness state of the element. This property reflects the <input> element's checked attribute.
18768
18857
  *
@@ -19567,6 +19656,12 @@ interface HTMLMediaElement extends HTMLElement {
19567
19656
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/canPlayType)
19568
19657
  */
19569
19658
  canPlayType(type: string): CanPlayTypeResult;
19659
+ /**
19660
+ * The **`captureStream()`** method of the HTMLMediaElement interface returns a MediaStream object which is streaming a real-time capture of the content being rendered in the media element.
19661
+ *
19662
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/captureStream)
19663
+ */
19664
+ captureStream(): MediaStream;
19570
19665
  /**
19571
19666
  * The **`HTMLMediaElement.fastSeek()`** method quickly seeks the media to the new time with precision tradeoff.
19572
19667
  *
@@ -21304,6 +21399,7 @@ interface HTMLTemplateElement extends HTMLElement {
21304
21399
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootClonable)
21305
21400
  */
21306
21401
  shadowRootClonable: boolean;
21402
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootCustomElementRegistry) */
21307
21403
  shadowRootCustomElementRegistry: string;
21308
21404
  /**
21309
21405
  * The **`shadowRootDelegatesFocus`** property of the HTMLTemplateElement interface reflects the value of the shadowrootdelegatesfocus attribute of the associated <template> element.
@@ -27896,6 +27992,12 @@ interface PerformanceResourceTiming extends PerformanceEntry {
27896
27992
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize)
27897
27993
  */
27898
27994
  readonly decodedBodySize: number;
27995
+ /**
27996
+ * The **`deliveryType`** read-only property is a string indicating how the resource was delivered — for example from the cache or from a navigational prefetch.
27997
+ *
27998
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/deliveryType)
27999
+ */
28000
+ readonly deliveryType: string;
27899
28001
  /**
27900
28002
  * The **`domainLookupEnd`** read-only property returns the timestamp immediately after the browser finishes the domain-name lookup for the resource.
27901
28003
  *
@@ -27920,6 +28022,18 @@ interface PerformanceResourceTiming extends PerformanceEntry {
27920
28022
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart)
27921
28023
  */
27922
28024
  readonly fetchStart: DOMHighResTimeStamp;
28025
+ /**
28026
+ * The **`finalResponseHeadersStart`** read-only property returns a timestamp immediately after the browser receives the first byte of the final document response (for example, 200 OK) from the server.
28027
+ *
28028
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/finalResponseHeadersStart)
28029
+ */
28030
+ readonly finalResponseHeadersStart: DOMHighResTimeStamp;
28031
+ /**
28032
+ * The **`firstInterimResponseStart`** read-only property returns a timestamp immediately after the browser receives the first byte of the interim 1xx response (for example, 100 Continue or 103 Early Hints) from the server.
28033
+ *
28034
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/firstInterimResponseStart)
28035
+ */
28036
+ readonly firstInterimResponseStart: DOMHighResTimeStamp;
27923
28037
  /**
27924
28038
  * The **`initiatorType`** read-only property is a string representing web platform feature that initiated the resource load.
27925
28039
  *
@@ -30350,7 +30464,7 @@ interface ReadableStreamDefaultController<R = any> {
30350
30464
  *
30351
30465
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
30352
30466
  */
30353
- enqueue(chunk?: R): void;
30467
+ enqueue(chunk: R): void;
30354
30468
  /**
30355
30469
  * The **`error()`** method of the ReadableStreamDefaultController interface causes any future interactions with the associated stream to error.
30356
30470
  *
@@ -40938,6 +41052,12 @@ interface WebTransport {
40938
41052
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/closed)
40939
41053
  */
40940
41054
  readonly closed: Promise<WebTransportCloseInfo>;
41055
+ /**
41056
+ * The **`congestionControl`** read-only property of the WebTransport interface indicates the application's preference for either high throughput or low-latency when sending data.
41057
+ *
41058
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/congestionControl)
41059
+ */
41060
+ readonly congestionControl: WebTransportCongestionControl;
40941
41061
  /**
40942
41062
  * The **`datagrams`** read-only property of the WebTransport interface returns a WebTransportDatagramDuplexStream instance that can be used to send and receive datagrams — unreliable data transmission.
40943
41063
  *
@@ -40956,12 +41076,19 @@ interface WebTransport {
40956
41076
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingUnidirectionalStreams)
40957
41077
  */
40958
41078
  readonly incomingUnidirectionalStreams: ReadableStream;
41079
+ readonly protocol: string;
40959
41080
  /**
40960
41081
  * The **`ready`** read-only property of the WebTransport interface returns a promise that resolves when the transport is ready to use.
40961
41082
  *
40962
41083
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/ready)
40963
41084
  */
40964
41085
  readonly ready: Promise<void>;
41086
+ /**
41087
+ * The **`reliability`** read-only property of the WebTransport interface indicates whether the connection supports reliable transports only, or whether it also supports unreliable transports (such as UDP).
41088
+ *
41089
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/reliability)
41090
+ */
41091
+ readonly reliability: WebTransportReliabilityMode;
40965
41092
  /**
40966
41093
  * The **`close()`** method of the WebTransport interface closes an ongoing WebTransport session.
40967
41094
  *
@@ -40980,6 +41107,12 @@ interface WebTransport {
40980
41107
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createUnidirectionalStream)
40981
41108
  */
40982
41109
  createUnidirectionalStream(options?: WebTransportSendStreamOptions): Promise<WritableStream>;
41110
+ /**
41111
+ * The **`getStats()`** method of the WebTransport interface asynchronously returns an object containing HTTP/3 connection statistics.
41112
+ *
41113
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/getStats)
41114
+ */
41115
+ getStats(): Promise<WebTransportConnectionStats>;
40983
41116
  }
40984
41117
 
40985
41118
  declare var WebTransport: {
@@ -41095,6 +41228,52 @@ declare var WebTransportError: {
41095
41228
  new(message?: string, options?: WebTransportErrorOptions): WebTransportError;
41096
41229
  };
41097
41230
 
41231
+ /**
41232
+ * The **`WebTransportReceiveStream`** interface of the WebTransport API is a ReadableStream that can be used to read from an incoming unidirectional or bidirectional WebTransport stream.
41233
+ * Available only in secure contexts.
41234
+ *
41235
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportReceiveStream)
41236
+ */
41237
+ interface WebTransportReceiveStream extends ReadableStream {
41238
+ /**
41239
+ * The **`getStats()`** method of the WebTransportReceiveStream interface asynchronously returns an object containing statistics for the current stream.
41240
+ *
41241
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportReceiveStream/getStats)
41242
+ */
41243
+ getStats(): Promise<WebTransportReceiveStreamStats>;
41244
+ }
41245
+
41246
+ declare var WebTransportReceiveStream: {
41247
+ prototype: WebTransportReceiveStream;
41248
+ new(): WebTransportReceiveStream;
41249
+ };
41250
+
41251
+ /**
41252
+ * The **`WebTransportSendStream`** interface of the WebTransport API is a specialized WritableStream that is used to send outbound data in both unidirectional or bidirectional WebTransport streams.
41253
+ * Available only in secure contexts.
41254
+ *
41255
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream)
41256
+ */
41257
+ interface WebTransportSendStream extends WritableStream {
41258
+ /**
41259
+ * The **`sendOrder`** property of the WebTransportSendStream interface indicates the send priority of this stream relative to other streams for which the value has been set.
41260
+ *
41261
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream/sendOrder)
41262
+ */
41263
+ sendOrder: number;
41264
+ /**
41265
+ * The **`getStats()`** method of the WebTransportSendStream interface asynchronously returns an object containing statistics for the current stream.
41266
+ *
41267
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream/getStats)
41268
+ */
41269
+ getStats(): Promise<WebTransportSendStreamStats>;
41270
+ }
41271
+
41272
+ declare var WebTransportSendStream: {
41273
+ prototype: WebTransportSendStream;
41274
+ new(): WebTransportSendStream;
41275
+ };
41276
+
41098
41277
  /**
41099
41278
  * The **`WheelEvent`** interface represents events that occur due to the user moving a mouse wheel or similar input device.
41100
41279
  *
@@ -44455,6 +44634,7 @@ type WakeLockType = "screen";
44455
44634
  type WebGLPowerPreference = "default" | "high-performance" | "low-power";
44456
44635
  type WebTransportCongestionControl = "default" | "low-latency" | "throughput";
44457
44636
  type WebTransportErrorSource = "session" | "stream";
44637
+ type WebTransportReliabilityMode = "pending" | "reliable-only" | "supports-unreliable";
44458
44638
  type WorkerType = "classic" | "module";
44459
44639
  type WriteCommandType = "seek" | "truncate" | "write";
44460
44640
  type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";