@@ -151,7 +151,6 @@ interface ClientData {
151
151
}
152
152
153
153
interface ClientQueryOptions {
154
- includeReserved?: boolean;
155
154
includeUncontrolled?: boolean;
156
155
type?: ClientTypes;
157
156
}
@@ -373,14 +372,15 @@ interface ExtendableMessageEventInit extends ExtendableEventInit {
373
372
data?: any;
374
373
lastEventId?: string;
375
374
origin?: string;
376
- ports?: MessagePort[] | null ;
377
- source?: object | ServiceWorker | MessagePort | null ;
375
+ ports?: MessagePort[];
376
+ source?: object | ServiceWorker | MessagePort;
378
377
}
379
378
380
379
interface FetchEventInit extends ExtendableEventInit {
381
380
clientId?: string;
381
+ preloadResponse: Promise<any>;
382
382
request: Request;
383
- reservedClientId ?: string;
383
+ resultingClientId ?: string;
384
384
targetClientId?: string;
385
385
}
386
386
@@ -962,6 +962,11 @@ interface MutationObserverInit {
962
962
subtree?: boolean;
963
963
}
964
964
965
+ interface NavigationPreloadState {
966
+ enabled?: boolean;
967
+ headerValue?: string;
968
+ }
969
+
965
970
interface NotificationAction {
966
971
action: string;
967
972
icon?: string;
@@ -1530,6 +1535,8 @@ interface RTCTransportStats extends RTCStats {
1530
1535
1531
1536
interface RegistrationOptions {
1532
1537
scope?: string;
1538
+ type?: WorkerType;
1539
+ updateViaCache?: ServiceWorkerUpdateViaCache;
1533
1540
}
1534
1541
1535
1542
interface RequestInit {
@@ -2902,13 +2909,13 @@ declare var CSSSupportsRule: {
2902
2909
};
2903
2910
2904
2911
interface Cache {
2905
- add(request: Request | string ): Promise<void>;
2906
- addAll(requests: (Request | string) []): Promise<void>;
2907
- delete(request: Request | string , options?: CacheQueryOptions): Promise<boolean>;
2908
- keys(request?: Request | string , options?: CacheQueryOptions): Promise<Request[] >;
2909
- match(request: Request | string , options?: CacheQueryOptions): Promise<Response>;
2910
- matchAll(request?: Request | string , options?: CacheQueryOptions): Promise<Response[] >;
2911
- put(request: Request | string , response: Response): Promise<void>;
2912
+ add(request: RequestInfo ): Promise<void>;
2913
+ addAll(requests: RequestInfo []): Promise<void>;
2914
+ delete(request: RequestInfo , options?: CacheQueryOptions): Promise<boolean>;
2915
+ keys(request?: RequestInfo , options?: CacheQueryOptions): Promise<ReadonlyArray< Request> >;
2916
+ match(request: RequestInfo , options?: CacheQueryOptions): Promise<Response | undefined >;
2917
+ matchAll(request?: RequestInfo , options?: CacheQueryOptions): Promise<ReadonlyArray< Response> >;
2918
+ put(request: RequestInfo , response: Response): Promise<void>;
2912
2919
}
2913
2920
2914
2921
declare var Cache: {
@@ -2920,7 +2927,7 @@ interface CacheStorage {
2920
2927
delete(cacheName: string): Promise<boolean>;
2921
2928
has(cacheName: string): Promise<boolean>;
2922
2929
keys(): Promise<string[]>;
2923
- match(request: Request | string , options?: CacheQueryOptions): Promise<any >;
2930
+ match(request: RequestInfo , options?: CacheQueryOptions): Promise<Response | undefined >;
2924
2931
open(cacheName: string): Promise<Cache>;
2925
2932
}
2926
2933
@@ -9458,7 +9465,7 @@ interface MessageEvent extends Event {
9458
9465
readonly data: any;
9459
9466
readonly origin: string;
9460
9467
readonly ports: ReadonlyArray<MessagePort>;
9461
- readonly source: Window | null ;
9468
+ readonly source: MessageEventSource ;
9462
9469
initMessageEvent(type: string, bubbles: boolean, cancelable: boolean, data: any, origin: string, lastEventId: string, source: Window): void;
9463
9470
}
9464
9471
@@ -9613,6 +9620,18 @@ declare var NamedNodeMap: {
9613
9620
new(): NamedNodeMap;
9614
9621
};
9615
9622
9623
+ interface NavigationPreloadManager {
9624
+ disable(): Promise<void>;
9625
+ enable(): Promise<void>;
9626
+ getState(): Promise<NavigationPreloadState>;
9627
+ setHeaderValue(value: string): Promise<void>;
9628
+ }
9629
+
9630
+ declare var NavigationPreloadManager: {
9631
+ prototype: NavigationPreloadManager;
9632
+ new(): NavigationPreloadManager;
9633
+ };
9634
+
9616
9635
interface Navigator extends NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, MSNavigatorDoNotTrack, MSFileSaver, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorUserMedia, NavigatorLanguage {
9617
9636
readonly activeVRDisplays: ReadonlyArray<VRDisplay>;
9618
9637
readonly authentication: WebAuthentication;
@@ -13333,18 +13352,18 @@ declare var ServiceWorker: {
13333
13352
13334
13353
interface ServiceWorkerContainerEventMap {
13335
13354
"controllerchange": Event;
13336
- "message": ServiceWorkerMessageEvent ;
13355
+ "message": MessageEvent ;
13337
13356
"messageerror": MessageEvent;
13338
13357
}
13339
13358
13340
13359
interface ServiceWorkerContainer extends EventTarget {
13341
13360
readonly controller: ServiceWorker | null;
13342
13361
oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null;
13343
- onmessage: ((this: ServiceWorkerContainer, ev: ServiceWorkerMessageEvent ) => any) | null;
13362
+ onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent ) => any) | null;
13344
13363
onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
13345
13364
readonly ready: Promise<ServiceWorkerRegistration>;
13346
13365
getRegistration(clientURL?: string): Promise<ServiceWorkerRegistration | undefined>;
13347
- getRegistrations(): Promise<ServiceWorkerRegistration[] >;
13366
+ getRegistrations(): Promise<ReadonlyArray< ServiceWorkerRegistration> >;
13348
13367
register(scriptURL: string, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
13349
13368
startMessages(): void;
13350
13369
addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
@@ -13378,10 +13397,12 @@ interface ServiceWorkerRegistrationEventMap {
13378
13397
interface ServiceWorkerRegistration extends EventTarget {
13379
13398
readonly active: ServiceWorker | null;
13380
13399
readonly installing: ServiceWorker | null;
13400
+ readonly navigationPreload: NavigationPreloadManager;
13381
13401
onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
13382
13402
readonly pushManager: PushManager;
13383
13403
readonly scope: string;
13384
13404
readonly sync: SyncManager;
13405
+ readonly updateViaCache: ServiceWorkerUpdateViaCache;
13385
13406
readonly waiting: ServiceWorker | null;
13386
13407
getNotifications(filter?: GetNotificationOptions): Promise<Notification[]>;
13387
13408
showNotification(title: string, options?: NotificationOptions): Promise<void>;
@@ -16552,7 +16573,7 @@ type RTCIceGatherCandidate = RTCIceCandidateDictionary | RTCIceCandidateComplete
16552
16573
type RTCTransport = RTCDtlsTransport | RTCSrtpSdesTransport;
16553
16574
type USVString = string;
16554
16575
type payloadtype = number;
16555
- type ClientTypes = "window" | "worker" | "sharedworker" | "all" ;
16576
+ type MessageEventSource = Window | MessagePort | ServiceWorker ;
16556
16577
type AppendMode = "segments" | "sequence";
16557
16578
type AudioContextLatencyCategory = "balanced" | "interactive" | "playback";
16558
16579
type AudioContextState = "suspended" | "running" | "closed";
@@ -16562,6 +16583,7 @@ type CanPlayTypeResult = "" | "maybe" | "probably";
16562
16583
type CanvasFillRule = "nonzero" | "evenodd";
16563
16584
type ChannelCountMode = "max" | "clamped-max" | "explicit";
16564
16585
type ChannelInterpretation = "speakers" | "discrete";
16586
+ type ClientTypes = "window" | "worker" | "sharedworker" | "all";
16565
16587
type DisplayCaptureSurfaceType = "monitor" | "window" | "application" | "browser";
16566
16588
type DistanceModelType = "linear" | "inverse" | "exponential";
16567
16589
type DocumentReadyState = "loading" | "interactive" | "complete";
@@ -16641,6 +16663,7 @@ type RequestRedirect = "follow" | "error" | "manual";
16641
16663
type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
16642
16664
type ScopedCredentialType = "ScopedCred";
16643
16665
type ServiceWorkerState = "installing" | "installed" | "activating" | "activated" | "redundant";
16666
+ type ServiceWorkerUpdateViaCache = "imports" | "all" | "none";
16644
16667
type TextTrackKind = "subtitles" | "captions" | "descriptions" | "chapters" | "metadata";
16645
16668
type TextTrackMode = "disabled" | "hidden" | "showing";
16646
16669
type TouchType = "direct" | "stylus";
@@ -16649,4 +16672,5 @@ type VRDisplayEventReason = "mounted" | "navigation" | "requested" | "unmounted"
16649
16672
type VREye = "left" | "right";
16650
16673
type VideoFacingModeEnum = "user" | "environment" | "left" | "right";
16651
16674
type VisibilityState = "hidden" | "visible" | "prerender" | "unloaded";
16675
+ type WorkerType = "classic" | "module";
16652
16676
type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
0 commit comments