# OffscreenCanvas对象 >![](../../public_sys-resources/icon-note.gif) **说明:** >从API Version 7 开始支持。 可以离屏渲染的canvas对象。 ## 属性
var ctx = canvas.getContext(contextId); var ctx = canvas.getContext(contextId, options); 其中contextId为必填项,当前仅支持"2d",options为可选项,暂时不支持。 获取offscreen canvas绘图上下文,参数仅支持“2d”,返回值为2D绘制对象,该对象提供具体的2D绘制操作。详见OffscreenCanvasRenderingContext2D对象章节。 |
||
|
||