diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index cbec67c3e..dccb1df34 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -10559,6 +10559,10 @@ interface OffscreenCanvas extends EventTarget { * * Returns null if the canvas has already been initialized with another context type (e.g., trying to get a "2d" context after getting a "webgl" context). */ + getContext(contextId: "2d", options?: any): OffscreenCanvasRenderingContext2D | null; + getContext(contextId: "bitmaprenderer", options?: any): ImageBitmapRenderingContext | null; + getContext(contextId: "webgl", options?: any): WebGLRenderingContext | null; + getContext(contextId: "webgl2", options?: any): WebGL2RenderingContext | null; getContext(contextId: OffscreenRenderingContextId, options?: any): OffscreenRenderingContext | null; /** Returns a newly created ImageBitmap object with the image in the OffscreenCanvas object. The image in the OffscreenCanvas object is replaced with a new blank image. */ transferToImageBitmap(): ImageBitmap; diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index a9d49219b..589047288 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -2512,6 +2512,10 @@ interface OffscreenCanvas extends EventTarget { * * Returns null if the canvas has already been initialized with another context type (e.g., trying to get a "2d" context after getting a "webgl" context). */ + getContext(contextId: "2d", options?: any): OffscreenCanvasRenderingContext2D | null; + getContext(contextId: "bitmaprenderer", options?: any): ImageBitmapRenderingContext | null; + getContext(contextId: "webgl", options?: any): WebGLRenderingContext | null; + getContext(contextId: "webgl2", options?: any): WebGL2RenderingContext | null; getContext(contextId: OffscreenRenderingContextId, options?: any): OffscreenRenderingContext | null; /** Returns a newly created ImageBitmap object with the image in the OffscreenCanvas object. The image in the OffscreenCanvas object is replaced with a new blank image. */ transferToImageBitmap(): ImageBitmap; diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index 02d0e22e2..ea691ca2d 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -2420,6 +2420,10 @@ interface OffscreenCanvas extends EventTarget { * * Returns null if the canvas has already been initialized with another context type (e.g., trying to get a "2d" context after getting a "webgl" context). */ + getContext(contextId: "2d", options?: any): OffscreenCanvasRenderingContext2D | null; + getContext(contextId: "bitmaprenderer", options?: any): ImageBitmapRenderingContext | null; + getContext(contextId: "webgl", options?: any): WebGLRenderingContext | null; + getContext(contextId: "webgl2", options?: any): WebGL2RenderingContext | null; getContext(contextId: OffscreenRenderingContextId, options?: any): OffscreenRenderingContext | null; /** Returns a newly created ImageBitmap object with the image in the OffscreenCanvas object. The image in the OffscreenCanvas object is replaced with a new blank image. */ transferToImageBitmap(): ImageBitmap; diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index a9f8a6438..f94fc9c6d 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -2607,6 +2607,10 @@ interface OffscreenCanvas extends EventTarget { * * Returns null if the canvas has already been initialized with another context type (e.g., trying to get a "2d" context after getting a "webgl" context). */ + getContext(contextId: "2d", options?: any): OffscreenCanvasRenderingContext2D | null; + getContext(contextId: "bitmaprenderer", options?: any): ImageBitmapRenderingContext | null; + getContext(contextId: "webgl", options?: any): WebGLRenderingContext | null; + getContext(contextId: "webgl2", options?: any): WebGL2RenderingContext | null; getContext(contextId: OffscreenRenderingContextId, options?: any): OffscreenRenderingContext | null; /** Returns a newly created ImageBitmap object with the image in the OffscreenCanvas object. The image in the OffscreenCanvas object is replaced with a new blank image. */ transferToImageBitmap(): ImageBitmap; diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index c688ef390..1fd634694 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -1136,6 +1136,20 @@ } } }, + "OffscreenCanvas": { + "methods": { + "method": { + "getContext": { + "additionalSignatures": [ + "getContext(contextId: \"2d\", options?: any): OffscreenCanvasRenderingContext2D | null", + "getContext(contextId: \"bitmaprenderer\", options?: any): ImageBitmapRenderingContext | null", + "getContext(contextId: \"webgl\", options?: any): WebGLRenderingContext | null", + "getContext(contextId: \"webgl2\", options?: any): WebGL2RenderingContext | null" + ] + } + } + } + }, "BeforeUnloadEvent": { "properties": { "property": {