语法
js
close()
参数
无。
返回值
无(undefined
)。
示例
js
const offscreen = new OffscreenCanvas(256, 256);
const gl = offscreen.getContext("webgl");
// Perform some drawing using the gl context
const bitmap = offscreen.transferToImageBitmap();
// ImageBitmap { width: 256, height: 256 }
bitmap.close();
// ImageBitmap { width: 0, height: 0 } — disposed
规范
规范 |
---|
HTML # dom-imagebitmap-close-dev |
浏览器兼容性
加载中…
另见
- 定义此方法的接口:
ImageBitmap
。