GPUCanvasContext: canvas property
The canvas
read-only property of the GPUCanvasContext
interface returns a reference to the canvas that the context was created from.
Value
Examples
const canvas = document.querySelector("#gpuCanvas");
const context = canvas.getContext("webgpu");
context.canvas;
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
canvas |
113Currently supported on ChromeOS, macOS, and Windows only.
|
113Currently supported on ChromeOS, macOS, and Windows only.
|
previewCurrently supported on Linux and Windows only.
|
No |
99Currently supported on ChromeOS, macOS, and Windows only.
|
No |
No |
No |
No |
No |
No |
No |
See also