getContext method

OffscreenRenderingContext? getContext(
  1. OffscreenRenderingContextId contextId, [
  2. JSAny? options
])

The OffscreenCanvas.getContext() method returns a drawing context for an offscreen canvas, or null if the context identifier is not supported.

Implementation

external OffscreenRenderingContext? getContext(
  OffscreenRenderingContextId contextId, [
  JSAny? options,
]);