diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index e29445f74..e4abe0612 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -19039,7 +19039,7 @@ declare namespace WebAssembly { var Global: { prototype: Global; - new(descriptor: GlobalDescriptor, value?: any): Global; + new(descriptor: GlobalDescriptor, v?: any): Global; }; interface Instance { @@ -19075,9 +19075,9 @@ declare namespace WebAssembly { var Module: { prototype: Module; new(bytes: BufferSource): Module; - customSections(module: Module, sectionName: string): ArrayBuffer[]; - exports(module: Module): ModuleExportDescriptor[]; - imports(module: Module): ModuleImportDescriptor[]; + customSections(moduleObject: Module, sectionName: string): ArrayBuffer[]; + exports(moduleObject: Module): ModuleExportDescriptor[]; + imports(moduleObject: Module): ModuleImportDescriptor[]; }; interface RuntimeError { @@ -19102,7 +19102,7 @@ declare namespace WebAssembly { interface GlobalDescriptor { mutable?: boolean; - value: string; + value: ValueType; } interface MemoryDescriptor { @@ -19135,8 +19135,10 @@ declare namespace WebAssembly { type ImportExportKind = "function" | "table" | "memory" | "global"; type TableKind = "anyfunc"; function compile(bytes: BufferSource): Promise; + function compileStreaming(source: Response | Promise): Promise; function instantiate(bytes: BufferSource, importObject?: any): Promise; function instantiate(moduleObject: Module, importObject?: any): Promise; + function instantiateStreaming(source: Response | Promise, importObject?: any): Promise; function validate(bytes: BufferSource): boolean; } @@ -20095,6 +20097,7 @@ type TouchType = "direct" | "stylus"; type Transport = "usb" | "nfc" | "ble"; type UserVerificationRequirement = "required" | "preferred" | "discouraged"; type VRDisplayEventReason = "mounted" | "navigation" | "requested" | "unmounted"; +type ValueType = "i32" | "i64" | "f32" | "f64"; type VideoFacingModeEnum = "user" | "environment" | "left" | "right"; type VisibilityState = "hidden" | "visible" | "prerender"; type WebGLPowerPreference = "default" | "low-power" | "high-performance"; diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index b84e14a4d..36602863e 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -5600,7 +5600,7 @@ declare namespace WebAssembly { var Global: { prototype: Global; - new(descriptor: GlobalDescriptor, value?: any): Global; + new(descriptor: GlobalDescriptor, v?: any): Global; }; interface Instance { @@ -5628,9 +5628,9 @@ declare namespace WebAssembly { var Module: { prototype: Module; new(bytes: BufferSource): Module; - customSections(module: Module, sectionName: string): ArrayBuffer[]; - exports(module: Module): ModuleExportDescriptor[]; - imports(module: Module): ModuleImportDescriptor[]; + customSections(moduleObject: Module, sectionName: string): ArrayBuffer[]; + exports(moduleObject: Module): ModuleExportDescriptor[]; + imports(moduleObject: Module): ModuleImportDescriptor[]; }; interface Table { @@ -5647,7 +5647,7 @@ declare namespace WebAssembly { interface GlobalDescriptor { mutable?: boolean; - value: string; + value: ValueType; } interface MemoryDescriptor { @@ -5680,8 +5680,10 @@ declare namespace WebAssembly { type ImportExportKind = "function" | "table" | "memory" | "global"; type TableKind = "anyfunc"; function compile(bytes: BufferSource): Promise; + function compileStreaming(source: Response | Promise): Promise; function instantiate(bytes: BufferSource, importObject?: any): Promise; function instantiate(moduleObject: Module, importObject?: any): Promise; + function instantiateStreaming(source: Response | Promise, importObject?: any): Promise; function validate(bytes: BufferSource): boolean; } @@ -5855,6 +5857,7 @@ type RequestRedirect = "follow" | "error" | "manual"; type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; type ServiceWorkerState = "installing" | "installed" | "activating" | "activated" | "redundant"; type ServiceWorkerUpdateViaCache = "imports" | "all" | "none"; +type ValueType = "i32" | "i64" | "f32" | "f64"; type VisibilityState = "hidden" | "visible" | "prerender"; type WebGLPowerPreference = "default" | "low-power" | "high-performance"; type WorkerType = "classic" | "module"; diff --git a/inputfiles/idl/WebAssembly JavaScript Interface.widl b/inputfiles/idl/WebAssembly JavaScript Interface.widl index ac8df6bbc..1899f4fd5 100644 --- a/inputfiles/idl/WebAssembly JavaScript Interface.widl +++ b/inputfiles/idl/WebAssembly JavaScript Interface.widl @@ -36,9 +36,9 @@ dictionary ModuleImportDescriptor { [LegacyNamespace=WebAssembly, Constructor(BufferSource bytes), Exposed=(Window,Worker,Worklet)] interface Module { - static sequence exports(Module module); - static sequence imports(Module module); - static sequence customSections(Module module, USVString sectionName); + static sequence exports(Module moduleObject); + static sequence imports(Module moduleObject); + static sequence customSections(Module moduleObject, DOMString sectionName); }; [LegacyNamespace=WebAssembly, Constructor(Module module, optional object importObject), Exposed=(Window,Worker,Worklet)] @@ -77,12 +77,19 @@ interface Table { readonly attribute unsigned long length; }; +enum ValueType { + "i32", + "i64", + "f32", + "f64" +}; + dictionary GlobalDescriptor { - required USVString value; + required ValueType value; boolean mutable = false; }; -[LegacyNamespace=WebAssembly, Constructor(GlobalDescriptor descriptor, optional any value), Exposed=(Window,Worker,Worklet)] +[LegacyNamespace=WebAssembly, Constructor(GlobalDescriptor descriptor, optional any v), Exposed=(Window,Worker,Worklet)] interface Global { any valueOf(); attribute any value; diff --git a/inputfiles/idl/WebAssembly Web API.widl b/inputfiles/idl/WebAssembly Web API.widl new file mode 100644 index 000000000..a65744a63 --- /dev/null +++ b/inputfiles/idl/WebAssembly Web API.widl @@ -0,0 +1,5 @@ +partial namespace WebAssembly { + Promise compileStreaming(Promise source); + Promise instantiateStreaming( + Promise source, optional object importObject); +}; diff --git a/inputfiles/idlSources.json b/inputfiles/idlSources.json index 4b4cadfad..643eeb9a7 100644 --- a/inputfiles/idlSources.json +++ b/inputfiles/idlSources.json @@ -375,6 +375,10 @@ "url": "https://www.w3.org/TR/wasm-js-api-1/", "title": "WebAssembly JavaScript Interface" }, + { + "url": "https://www.w3.org/TR/wasm-web-api-1/", + "title": "WebAssembly Web API" + }, { "url": "https://webaudio.github.io/web-audio-api/", "title": "Web Audio"