Skip to content

Commit 84dea31

Browse files
authored
Co-authored-by: saschanaz <[email protected]>
1 parent 12edd40 commit 84dea31

7 files changed

+342
-7
lines changed

baselines/dom.generated.d.ts

+201
Large diffs are not rendered by default.

baselines/serviceworker.generated.d.ts

+22
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,11 @@ interface MultiCacheQueryOptions extends CacheQueryOptions {
359359
cacheName?: string;
360360
}
361361

362+
interface NavigationPreloadState {
363+
enabled?: boolean;
364+
headerValue?: string;
365+
}
366+
362367
interface NotificationAction {
363368
action: string;
364369
icon?: string;
@@ -1404,6 +1409,7 @@ declare var ExtendableMessageEvent: {
14041409
interface FetchEvent extends ExtendableEvent {
14051410
readonly clientId: string;
14061411
readonly handled: Promise<undefined>;
1412+
readonly preloadResponse: Promise<any>;
14071413
readonly request: Request;
14081414
readonly resultingClientId: string;
14091415
respondWith(r: Response | PromiseLike<Response>): void;
@@ -2043,6 +2049,7 @@ declare var ImageBitmapRenderingContext: {
20432049

20442050
/** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */
20452051
interface ImageData {
2052+
readonly colorSpace: PredefinedColorSpace;
20462053
/** Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. */
20472054
readonly data: Uint8ClampedArray;
20482055
/** Returns the actual dimensions of the data in the ImageData object, in pixels. */
@@ -2159,6 +2166,19 @@ declare var MessagePort: {
21592166
new(): MessagePort;
21602167
};
21612168

2169+
/** Available only in secure contexts. */
2170+
interface NavigationPreloadManager {
2171+
disable(): Promise<void>;
2172+
enable(): Promise<void>;
2173+
getState(): Promise<NavigationPreloadState>;
2174+
setHeaderValue(value: string): Promise<void>;
2175+
}
2176+
2177+
declare var NavigationPreloadManager: {
2178+
prototype: NavigationPreloadManager;
2179+
new(): NavigationPreloadManager;
2180+
};
2181+
21622182
interface NavigatorConcurrentHardware {
21632183
readonly hardwareConcurrency: number;
21642184
}
@@ -5113,6 +5133,7 @@ interface WindowOrWorkerGlobalScope {
51135133
reportError(e: any): void;
51145134
setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
51155135
setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5136+
structuredClone(value: any, options?: StructuredSerializeOptions): any;
51165137
}
51175138

51185139
interface WorkerGlobalScopeEventMap {
@@ -5482,6 +5503,7 @@ declare function queueMicrotask(callback: VoidFunction): void;
54825503
declare function reportError(e: any): void;
54835504
declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
54845505
declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5506+
declare function structuredClone(value: any, options?: StructuredSerializeOptions): any;
54855507
declare function addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
54865508
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
54875509
declare function removeEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;

baselines/sharedworker.generated.d.ts

+21
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,11 @@ interface MultiCacheQueryOptions extends CacheQueryOptions {
334334
cacheName?: string;
335335
}
336336

337+
interface NavigationPreloadState {
338+
enabled?: boolean;
339+
headerValue?: string;
340+
}
341+
337342
interface NotificationAction {
338343
action: string;
339344
icon?: string;
@@ -1963,6 +1968,7 @@ declare var ImageBitmapRenderingContext: {
19631968

19641969
/** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */
19651970
interface ImageData {
1971+
readonly colorSpace: PredefinedColorSpace;
19661972
/** Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. */
19671973
readonly data: Uint8ClampedArray;
19681974
/** Returns the actual dimensions of the data in the ImageData object, in pixels. */
@@ -2079,6 +2085,19 @@ declare var MessagePort: {
20792085
new(): MessagePort;
20802086
};
20812087

2088+
/** Available only in secure contexts. */
2089+
interface NavigationPreloadManager {
2090+
disable(): Promise<void>;
2091+
enable(): Promise<void>;
2092+
getState(): Promise<NavigationPreloadState>;
2093+
setHeaderValue(value: string): Promise<void>;
2094+
}
2095+
2096+
declare var NavigationPreloadManager: {
2097+
prototype: NavigationPreloadManager;
2098+
new(): NavigationPreloadManager;
2099+
};
2100+
20822101
interface NavigatorConcurrentHardware {
20832102
readonly hardwareConcurrency: number;
20842103
}
@@ -4968,6 +4987,7 @@ interface WindowOrWorkerGlobalScope {
49684987
reportError(e: any): void;
49694988
setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
49704989
setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
4990+
structuredClone(value: any, options?: StructuredSerializeOptions): any;
49714991
}
49724992

49734993
interface WorkerEventMap extends AbstractWorkerEventMap {
@@ -5499,6 +5519,7 @@ declare function queueMicrotask(callback: VoidFunction): void;
54995519
declare function reportError(e: any): void;
55005520
declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
55015521
declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5522+
declare function structuredClone(value: any, options?: StructuredSerializeOptions): any;
55025523
declare function addEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
55035524
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
55045525
declare function removeEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;

baselines/webworker.generated.d.ts

+85
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,11 @@ interface MultiCacheQueryOptions extends CacheQueryOptions {
359359
cacheName?: string;
360360
}
361361

362+
interface NavigationPreloadState {
363+
enabled?: boolean;
364+
headerValue?: string;
365+
}
366+
362367
interface NotificationAction {
363368
action: string;
364369
icon?: string;
@@ -455,6 +460,22 @@ interface QueuingStrategyInit {
455460
highWaterMark: number;
456461
}
457462

463+
interface RTCEncodedAudioFrameMetadata {
464+
contributingSources?: number[];
465+
synchronizationSource?: number;
466+
}
467+
468+
interface RTCEncodedVideoFrameMetadata {
469+
contributingSources?: number[];
470+
dependencies?: number[];
471+
frameId?: number;
472+
height?: number;
473+
spatialIndex?: number;
474+
synchronizationSource?: number;
475+
temporalIndex?: number;
476+
width?: number;
477+
}
478+
458479
interface ReadableStreamDefaultReadDoneResult {
459480
done: true;
460481
value?: undefined;
@@ -628,6 +649,13 @@ interface UnderlyingSource<R = any> {
628649
type?: undefined;
629650
}
630651

652+
interface VideoColorSpaceInit {
653+
fullRange?: boolean;
654+
matrix?: VideoMatrixCoefficients;
655+
primaries?: VideoColorPrimaries;
656+
transfer?: VideoTransferCharacteristics;
657+
}
658+
631659
interface VideoConfiguration {
632660
bitrate: number;
633661
colorGamut?: ColorGamut;
@@ -1442,6 +1470,7 @@ declare var ExtendableMessageEvent: {
14421470
interface FetchEvent extends ExtendableEvent {
14431471
readonly clientId: string;
14441472
readonly handled: Promise<undefined>;
1473+
readonly preloadResponse: Promise<any>;
14451474
readonly request: Request;
14461475
readonly resultingClientId: string;
14471476
respondWith(r: Response | PromiseLike<Response>): void;
@@ -2095,6 +2124,7 @@ declare var ImageBitmapRenderingContext: {
20952124

20962125
/** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */
20972126
interface ImageData {
2127+
readonly colorSpace: PredefinedColorSpace;
20982128
/** Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. */
20992129
readonly data: Uint8ClampedArray;
21002130
/** Returns the actual dimensions of the data in the ImageData object, in pixels. */
@@ -2211,6 +2241,19 @@ declare var MessagePort: {
22112241
new(): MessagePort;
22122242
};
22132243

2244+
/** Available only in secure contexts. */
2245+
interface NavigationPreloadManager {
2246+
disable(): Promise<void>;
2247+
enable(): Promise<void>;
2248+
getState(): Promise<NavigationPreloadState>;
2249+
setHeaderValue(value: string): Promise<void>;
2250+
}
2251+
2252+
declare var NavigationPreloadManager: {
2253+
prototype: NavigationPreloadManager;
2254+
new(): NavigationPreloadManager;
2255+
};
2256+
22142257
interface NavigatorConcurrentHardware {
22152258
readonly hardwareConcurrency: number;
22162259
}
@@ -2609,6 +2652,29 @@ declare var PushSubscriptionOptions: {
26092652
new(): PushSubscriptionOptions;
26102653
};
26112654

2655+
interface RTCEncodedAudioFrame {
2656+
data: ArrayBuffer;
2657+
readonly timestamp: number;
2658+
getMetadata(): RTCEncodedAudioFrameMetadata;
2659+
}
2660+
2661+
declare var RTCEncodedAudioFrame: {
2662+
prototype: RTCEncodedAudioFrame;
2663+
new(): RTCEncodedAudioFrame;
2664+
};
2665+
2666+
interface RTCEncodedVideoFrame {
2667+
data: ArrayBuffer;
2668+
readonly timestamp: number;
2669+
readonly type: RTCEncodedVideoFrameType;
2670+
getMetadata(): RTCEncodedVideoFrameMetadata;
2671+
}
2672+
2673+
declare var RTCEncodedVideoFrame: {
2674+
prototype: RTCEncodedVideoFrame;
2675+
new(): RTCEncodedVideoFrame;
2676+
};
2677+
26122678
/** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */
26132679
interface ReadableStream<R = any> {
26142680
readonly locked: boolean;
@@ -3075,6 +3141,19 @@ declare var URLSearchParams: {
30753141
toString(): string;
30763142
};
30773143

3144+
interface VideoColorSpace {
3145+
readonly fullRange: boolean | null;
3146+
readonly matrix: VideoMatrixCoefficients | null;
3147+
readonly primaries: VideoColorPrimaries | null;
3148+
readonly transfer: VideoTransferCharacteristics | null;
3149+
toJSON(): VideoColorSpaceInit;
3150+
}
3151+
3152+
declare var VideoColorSpace: {
3153+
prototype: VideoColorSpace;
3154+
new(init?: VideoColorSpaceInit): VideoColorSpace;
3155+
};
3156+
30783157
interface WEBGL_color_buffer_float {
30793158
readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
30803159
readonly RGBA32F_EXT: GLenum;
@@ -5188,6 +5267,7 @@ interface WindowOrWorkerGlobalScope {
51885267
reportError(e: any): void;
51895268
setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
51905269
setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5270+
structuredClone(value: any, options?: StructuredSerializeOptions): any;
51915271
}
51925272

51935273
interface WorkerEventMap extends AbstractWorkerEventMap {
@@ -5727,6 +5807,7 @@ declare function queueMicrotask(callback: VoidFunction): void;
57275807
declare function reportError(e: any): void;
57285808
declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
57295809
declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5810+
declare function structuredClone(value: any, options?: StructuredSerializeOptions): any;
57305811
declare function cancelAnimationFrame(handle: number): void;
57315812
declare function requestAnimationFrame(callback: FrameRequestCallback): number;
57325813
declare function addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
@@ -5807,6 +5888,7 @@ type PermissionState = "denied" | "granted" | "prompt";
58075888
type PredefinedColorSpace = "display-p3" | "srgb";
58085889
type PremultiplyAlpha = "default" | "none" | "premultiply";
58095890
type PushEncryptionKeyName = "auth" | "p256dh";
5891+
type RTCEncodedVideoFrameType = "delta" | "empty" | "key";
58105892
type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
58115893
type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
58125894
type RequestCredentials = "include" | "omit" | "same-origin";
@@ -5819,6 +5901,9 @@ type SecurityPolicyViolationEventDisposition = "enforce" | "report";
58195901
type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
58205902
type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
58215903
type TransferFunction = "hlg" | "pq" | "srgb";
5904+
type VideoColorPrimaries = "bt470bg" | "bt709" | "smpte170m";
5905+
type VideoMatrixCoefficients = "bt470bg" | "bt709" | "rgb" | "smpte170m";
5906+
type VideoTransferCharacteristics = "bt709" | "iec61966-2-1" | "smpte170m";
58225907
type WebGLPowerPreference = "default" | "high-performance" | "low-power";
58235908
type WorkerType = "classic" | "module";
58245909
type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";

package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/build/helpers.ts

+3
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ export function exposesTo(o: { exposed?: string }, target: string[]): boolean {
9999
if (!o || typeof o.exposed !== "string") {
100100
return true;
101101
}
102+
if (o.exposed === "*") {
103+
return true;
104+
}
102105
return o.exposed.split(" ").some((e) => target.includes(e));
103106
}
104107

src/build/widlprocess.ts

+3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ function getExtAttr(extAttrs: webidl2.ExtendedAttribute[], name: string) {
8080
if (!attr || !attr.rhs) {
8181
return [];
8282
}
83+
if (attr.rhs.type === ("*" as any)) {
84+
return ["*"];
85+
}
8386
return attr.rhs.type === "identifier-list" ||
8487
attr.rhs.type === "string-list" ||
8588
attr.rhs.type === "decimal-list" ||

0 commit comments

Comments
 (0)