語法
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。