Skip to main content
Version: 3.x

OffscreenCanvas

The off-screen canvas instance, which can be created via Taro.createOffscreenCanvas.

Reference

Methods

getContext

Returns the OffscreenCanvas drawing context.


Only WebGL drawing context can be obtained.

(contextType: string) => RenderingContext
PropertyType
contextTypestring

API Support

APIWeChat Mini-ProgramH5React Native
OffscreenCanvas.getContext✔️

API Support

APIWeChat Mini-ProgramH5React Native
OffscreenCanvas.getContext✔️