HTMLCanvasElement: getContext() method

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

* Some parts of this feature may have varying levels of support.

The HTMLCanvasElement.getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported, or the canvas has already been set to a different context mode.

Later calls to this method on the same canvas element, with the same contextType argument, will always return the same drawing context instance as was returned the first time the method was invoked. It is not possible to get a different drawing context object on a given canvas element.

Syntax

js
getContext(contextType)
getContext(contextType, contextAttributes)

Parameters

contextType

A string containing the context identifier defining the drawing context associated to the canvas. Possible values are:

"2d"

Creates a CanvasRenderingContext2D object representing a two-dimensional rendering context.

"webgl" (or "experimental-webgl")

Creates a WebGLRenderingContext object representing a three-dimensional rendering context. This context is only available on browsers that implement WebGL version 1 (OpenGL ES 2.0).

"webgl2"

Creates a WebGL2RenderingContext object representing a three-dimensional rendering context. This context is only available on browsers that implement WebGL version 2 (OpenGL ES 3.0).

"webgpu"

Creates a GPUCanvasContext object representing a three-dimensional rendering context for WebGPU render pipelines. This context is only available on browsers that implement The WebGPU API.

"bitmaprenderer"

Creates an ImageBitmapRenderingContext which only provides functionality to replace the content of the canvas with a given ImageBitmap.

Note: The identifier "experimental-webgl" is used in new implementations of WebGL. These implementations have either not reached test suite conformance, or the graphics drivers on the platform are not yet stable. The Khronos Group certifies WebGL implementations under certain conformance rules.

contextAttributes Optional

You can use several context attributes when creating your rendering context, for example:

js
const gl = canvas.getContext("webgl", {
  antialias: false,
  depth: false,
});

2d context attributes:

alpha

A boolean value that indicates if the canvas contains an alpha channel. If set to false, the browser now knows that the backdrop is always opaque, which can speed up drawing of transparent content and images.

colorSpace Optional

Specifies the color space of the rendering context. Possible values are:

colorType Optional

Specifies the color type of the rendering context. Possible values are:

  • "unorm8" sets the color channels to 8 bit unsigned values. This is the default value.
  • "float16" sets the color channels to 16-bit floating-point values.
desynchronized

A boolean value that hints the user agent to reduce the latency by desynchronizing the canvas paint cycle from the event loop.

willReadFrequently

A boolean value that indicates whether or not a lot of read-back operations are planned. This will force the use of a software (instead of hardware accelerated) 2D canvas and can save memory when calling getImageData() frequently.

WebGL context attributes:

alpha

A boolean value that indicates if the canvas contains an alpha buffer.

depth

A boolean value that indicates that the drawing buffer is requested to have a depth buffer of at least 16 bits.

stencil

A boolean value that indicates that the drawing buffer is requested to have a stencil buffer of at least 8 bits.

desynchronized

A boolean value that hints the user agent to reduce the latency by desynchronizing the canvas paint cycle from the event loop.

antialias

A boolean value that indicates whether or not to perform anti-aliasing if possible.

failIfMajorPerformanceCaveat

A boolean value that indicates if a context will be created if the system performance is low or if no hardware GPU is available.

powerPreference

A hint to the user agent indicating what configuration of GPU is suitable for the WebGL context. Possible values are:

"default"

Let the user agent decide which GPU configuration is most suitable. This is the default value.

"high-performance"

Prioritizes rendering performance over power consumption.

"low-power"

Prioritizes power saving over rendering performance.

premultipliedAlpha

A boolean value that indicates that the page compositor will assume the drawing buffer contains colors with pre-multiplied alpha.

preserveDrawingBuffer

If the value is true the buffers will not be cleared and will preserve their values until cleared or overwritten by the author.

xrCompatible

A boolean value that hints to the user agent to use a compatible graphics adapter for an immersive XR device. Setting this synchronous flag at context creation is discouraged; rather call the asynchronous WebGLRenderingContext.makeXRCompatible() method the moment you intend to start an XR session.

Note: The WebGPU specification does not define any specific context attributes for getContext(). Instead, it provides configuration options via the GPUCanvasContext.configure() method.

Return value

A rendering context which is either a

If the context identifier is not supported, or the canvas has already been set to a different context mode, null is returned.

Exceptions

InvalidStateError DOMException

Throws if the canvas has transferred its control to offscreen by calling HTMLCanvasElement.transferControlToOffscreen().

Examples

Given this <canvas> element:

html
<canvas id="canvas" width="300" height="300"></canvas>

You can get a 2d context of the canvas with the following code:

js
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");
console.log(ctx); // CanvasRenderingContext2D { /* … */ }

Now you have the 2D rendering context for a canvas and you can draw within it.

Specifications

Specification
HTML
# dom-canvas-getcontext-dev

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
getContext
Chrome – Full support
Chrome 1 (Release date: 2008-12-11)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – Full support
Firefox 1.5 (Release date: 2005-11-29)
footnote Full support
Opera – Full support
Opera 9 (Release date: 2006-06-20)
footnote Full support
Safari – Full support
Safari 2 (Release date: 2005-04-29)
footnote Full support
Chrome Android – Full support
Chrome Android 18 (Release date: 2012-06-27)
footnote Full support
Firefox for Android – Full support
Firefox for Android 4 (Release date: 2011-03-29)
footnote Full support
Opera Android – Full support
Opera Android 10.1 (Release date: 2010-11-09)
footnote Full support
Safari on iOS – Full support
Safari on iOS 1 (Release date: 2007-06-29)
footnote Full support
Samsung Internet – Full support
Samsung Internet 1 (Release date: 2013-04-27)
footnote Full support
WebView Android – Full support
WebView Android 4.4 (Release date: 2013-12-09)
footnote Full support
WebView on iOS – Full support
WebView on iOS 1 (Release date: 2007-06-29)
footnote Full support
2d context
Chrome – Full support
Chrome 1 (Release date: 2008-12-11)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – Full support
Firefox 1.5 (Release date: 2005-11-29)
footnote Full support
Opera – Full support
Opera 9 (Release date: 2006-06-20)
footnote Full support
Safari – Full support
Safari 2 (Release date: 2005-04-29)
footnote Full support
Chrome Android – Full support
Chrome Android 18 (Release date: 2012-06-27)
footnote Full support
Firefox for Android – Full support
Firefox for Android 4 (Release date: 2011-03-29)
footnote Full support
Opera Android – Full support
Opera Android 10.1 (Release date: 2010-11-09)
footnote Full support
Safari on iOS – Full support
Safari on iOS 1 (Release date: 2007-06-29)
footnote Full support
Samsung Internet – Full support
Samsung Internet 1 (Release date: 2013-04-27)
footnote Full support
WebView Android – Full support
WebView Android 4.4 (Release date: 2013-12-09)
footnote Full support
WebView on iOS – Full support
WebView on iOS 1 (Release date: 2007-06-29)
footnote Full support
options.alpha parameter
Chrome – Full support
Chrome 32 (Release date: 2014-01-14)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 30 (Release date: 2014-06-10)
footnote Full support
Opera – Full support
Opera 19 (Release date: 2014-01-28)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 32 (Release date: 2014-01-15)
footnote Full support
Firefox for Android – Full support
Firefox for Android 30 (Release date: 2014-06-10)
footnote Full support
Opera Android – Full support
Opera Android 19 (Release date: 2014-01-28)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 2 (Release date: 2014-10-17)
footnote Full support
WebView Android – Full support
WebView Android 4.4.3 (Release date: 2014-06-02)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
options.colorSpace parameter
Chrome – Full support
Chrome 92 (Release date: 2021-07-20)
footnote Full support
Edge – Full support
Edge 92 (Release date: 2021-07-22)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 78 (Release date: 2021-08-03)
footnote Full support
Safari – Full support
Safari 15.2 (Release date: 2021-12-13)
footnote Full support
Chrome Android – Full support
Chrome Android 92 (Release date: 2021-07-20)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 65 (Release date: 2021-10-20)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15.2 (Release date: 2021-12-13)
footnote Full support
Samsung Internet – Full support
Samsung Internet 16 (Release date: 2021-11-25)
footnote Full support
WebView Android – Full support
WebView Android 92 (Release date: 2021-07-20)
footnote Full support
WebView on iOS – Full support
WebView on iOS 15.2 (Release date: 2021-12-13)
footnote Full support
options.colorType parameter
Experimental
Chrome – Full support
Chrome 137 (Release date: 2025-05-27)
footnote Full support
Edge – Full support
Edge 137 (Release date: 2025-05-29)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 121 (Release date: 2025-08-27)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 137 (Release date: 2025-05-27)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 90 (Release date: 2025-06-18)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 137 (Release date: 2025-05-27)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
options.desynchronized parameter
Chrome – Partial support
Chrome 75 – 80 (Release date: 2019-06-04)
footnote Partial support
footnote ChromeOS only
Chrome – Full support
Chrome 81 (Release date: 2020-04-07)
footnote
footnote ChromeOS and Windows
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 68 (Release date: 2020-04-22)
footnote Full support
Safari – Full support
Safari 15 (Release date: 2021-09-20)
footnote Full support
Chrome Android – Full support
Chrome Android 75 (Release date: 2019-06-04)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 54 (Release date: 2019-10-18)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
Samsung Internet – Full support
Samsung Internet 11 (Release date: 2019-12-05)
footnote Full support
WebView Android – Full support
WebView Android 75 (Release date: 2019-06-04)
footnote Full support
WebView on iOS – Full support
WebView on iOS 15 (Release date: 2021-09-20)
footnote Full support
options.willReadFrequently parameter
Chrome – Full support
Chrome 99 (Release date: 2022-03-01)
footnote Full support
Edge – Full support
Edge 99 (Release date: 2022-03-03)
footnote Full support
Firefox – Full support
Firefox 28 (Release date: 2014-03-18)
footnote Full support
Opera – Full support
Opera 85 (Release date: 2022-03-23)
footnote Full support
Safari – Full support
Safari 18 (Release date: 2024-09-16)
footnote Full support
Chrome Android – Full support
Chrome Android 99 (Release date: 2022-03-01)
footnote Full support
Firefox for Android – Full support
Firefox for Android 28 (Release date: 2014-03-18)
footnote Full support
Opera Android – Full support
Opera Android 68 (Release date: 2022-03-30)
footnote Full support
Safari on iOS – Full support
Safari on iOS 18 (Release date: 2024-09-16)
footnote Full support
Samsung Internet – Full support
Samsung Internet 18 (Release date: 2022-08-08)
footnote Full support
WebView Android – Full support
WebView Android 99 (Release date: 2022-03-01)
footnote Full support
WebView on iOS – Full support
WebView on iOS 18 (Release date: 2024-09-16)
footnote Full support
bitmaprenderer context
Chrome – Full support
Chrome 66 (Release date: 2018-04-17)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 46 (Release date: 2016-04-26)
footnote Full support
Opera – Full support
Opera 53 (Release date: 2018-05-10)
footnote Full support
Safari – Full support
Safari 11.1 (Release date: 2018-04-12)
footnote Full support
Chrome Android – Full support
Chrome Android 66 (Release date: 2018-04-17)
footnote Full support
Firefox for Android – Full support
Firefox for Android 46 (Release date: 2016-04-26)
footnote Full support
Opera Android – Full support
Opera Android 47 (Release date: 2018-07-23)
footnote Full support
Safari on iOS – Full support
Safari on iOS 11.3 (Release date: 2018-03-29)
footnote Full support
Samsung Internet – Full support
Samsung Internet 9 (Release date: 2018-09-15)
footnote Full support
WebView Android – Full support
WebView Android 66 (Release date: 2018-04-17)
footnote Full support
WebView on iOS – Full support
WebView on iOS 11.3 (Release date: 2018-03-29)
footnote Full support
options.alpha parameter
Chrome – Full support
Chrome 66 (Release date: 2018-04-17)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 53 (Release date: 2018-05-10)
footnote Full support
Safari – Full support
Safari 11.1 (Release date: 2018-04-12)
footnote Full support
Chrome Android – Full support
Chrome Android 66 (Release date: 2018-04-17)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 47 (Release date: 2018-07-23)
footnote Full support
Safari on iOS – Full support
Safari on iOS 11.3 (Release date: 2018-03-29)
footnote Full support
Samsung Internet – Full support
Samsung Internet 9 (Release date: 2018-09-15)
footnote Full support
WebView Android – Full support
WebView Android 66 (Release date: 2018-04-17)
footnote Full support
WebView on iOS – Full support
WebView on iOS 11.3 (Release date: 2018-03-29)
footnote Full support
WebGL2 context
Chrome – Full support
Chrome 56 (Release date: 2017-01-25)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 25 (Release date: 2013-10-29)
altname
altname Alternate name: experimental-webgl2
Firefox – Full support
Firefox 51 (Release date: 2017-01-24)
footnote Full support
Opera – Full support
Opera 43 (Release date: 2017-02-07)
footnote Full support
Safari – Full support
Safari 15 (Release date: 2021-09-20)
footnote Full support
Chrome Android – Full support
Chrome Android 56 (Release date: 2017-02-01)
footnote Full support
Firefox for Android – Full support
Firefox for Android 25 (Release date: 2013-10-29)
altname
altname Alternate name: experimental-webgl2
Firefox for Android – Full support
Firefox for Android 51 (Release date: 2017-01-24)
footnote Full support
Opera Android – Full support
Opera Android 43 (Release date: 2017-09-27)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
Samsung Internet – Full support
Samsung Internet 6 (Release date: 2017-08-23)
footnote Full support
WebView Android – Full support
WebView Android 56 (Release date: 2017-02-01)
footnote Full support
WebView on iOS – Full support
WebView on iOS 15 (Release date: 2021-09-20)
footnote Full support
options.alpha parameter
Chrome – Full support
Chrome 56 (Release date: 2017-01-25)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 30 (Release date: 2014-06-10)
footnote Full support
Opera – Full support
Opera 43 (Release date: 2017-02-07)
footnote Full support
Safari – Full support
Safari 15 (Release date: 2021-09-20)
footnote Full support
Chrome Android – Full support
Chrome Android 56 (Release date: 2017-02-01)
footnote Full support
Firefox for Android – Full support
Firefox for Android 30 (Release date: 2014-06-10)
footnote Full support
Opera Android – Full support
Opera Android 43 (Release date: 2017-09-27)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
Samsung Internet – Full support
Samsung Internet 6 (Release date: 2017-08-23)
footnote Full support
WebView Android – Full support
WebView Android 56 (Release date: 2017-02-01)
footnote Full support
WebView on iOS – Full support
WebView on iOS 15 (Release date: 2021-09-20)
footnote Full support
options.desynchronized parameter
Chrome – Partial support
Chrome 75 – 80 (Release date: 2019-06-04)
footnote Partial support
footnote ChromeOS only
Chrome – Full support
Chrome 81 (Release date: 2020-04-07)
footnote
footnote ChromeOS and Windows
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 68 (Release date: 2020-04-22)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 75 (Release date: 2019-06-04)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 54 (Release date: 2019-10-18)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 11 (Release date: 2019-12-05)
footnote Full support
WebView Android – Full support
WebView Android 75 (Release date: 2019-06-04)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
options.failIfMajorPerformanceCaveat parameter
Chrome – Full support
Chrome 56 (Release date: 2017-01-25)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 41 (Release date: 2015-09-22)
footnote Full support
Opera – Full support
Opera 43 (Release date: 2017-02-07)
footnote Full support
Safari – Full support
Safari 15 (Release date: 2021-09-20)
footnote Full support
Chrome Android – Full support
Chrome Android 56 (Release date: 2017-02-01)
footnote Full support
Firefox for Android – Full support
Firefox for Android 41 (Release date: 2015-09-22)
footnote Full support
Opera Android – Full support
Opera Android 43 (Release date: 2017-09-27)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
Samsung Internet – Full support
Samsung Internet 6 (Release date: 2017-08-23)
footnote Full support
WebView Android – Full support
WebView Android 56 (Release date: 2017-02-01)
footnote Full support
WebView on iOS – Full support
WebView on iOS 15 (Release date: 2021-09-20)
footnote Full support
options.powerPreference parameter
Chrome – Partial support
Chrome 75 (Release date: 2019-06-04)
footnote Partial support
footnote Chrome respects the GPU hint on macOS only.
Edge – Partial support
Edge 79 (Release date: 2020-01-15)
footnote Partial support
footnote Edge respects the GPU hint on macOS only.
Firefox – Partial support
Firefox 63 (Release date: 2018-10-23)
footnote Partial support
footnote Firefox respects the GPU hint on macOS only.
Opera – Partial support
Opera 62 (Release date: 2019-06-27)
footnote Partial support
footnote Opera respects the GPU hint on macOS only.
Safari – Full support
Safari 15 (Release date: 2021-09-20)
footnote Full support
Chrome Android – Partial support
Chrome Android 75 (Release date: 2019-06-04)
footnote Partial support
footnote Chrome Android respects the GPU hint on macOS only.
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Partial support
Opera Android 54 (Release date: 2019-10-18)
footnote Partial support
footnote Opera Android respects the GPU hint on macOS only.
Safari on iOS – Full support
Safari on iOS 15 (Release date: 2021-09-20)
footnote Full support
Samsung Internet – Partial support
Samsung Internet 11 (Release date: 2019-12-05)
footnote Partial support
footnote Samsung Internet respects the GPU hint on macOS only.
WebView Android – Partial support
WebView Android 75 (Release date: 2019-06-04)
footnote Partial support
footnote WebView Android respects the GPU hint on macOS only.
WebView on iOS – Full support
WebView on iOS 15 (Release date: 2021-09-20)
footnote Full support
WebGL context
Chrome – Full support
Chrome 9 (Release date: 2011-02-03)
altname
altname Alternate name: experimental-webgl
Chrome – Full support
Chrome 33 (Release date: 2014-02-20)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
altname
altname Alternate name: experimental-webgl
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 3.6 (Release date: 2010-01-21)
altname
altname Alternate name: experimental-webgl
Firefox – Full support
Firefox 24 (Release date: 2013-09-17)
footnote Full support
Opera – Full support
Opera 9 (Release date: 2006-06-20)
altname
altname Alternate name: experimental-webgl
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 5.1 (Release date: 2011-07-20)
altname
altname Alternate name: experimental-webgl
Safari – Full support
Safari 8 (Release date: 2014-10-16)
footnote Full support
Chrome Android – Full support
Chrome Android 18 (Release date: 2012-06-27)
altname
altname Alternate name: experimental-webgl
Chrome Android – Full support
Chrome Android 33 (Release date: 2014-02-26)
footnote Full support
Firefox for Android – Full support
Firefox for Android 4 (Release date: 2011-03-29)
altname
altname Alternate name: experimental-webgl
Firefox for Android – Full support
Firefox for Android 24 (Release date: 2013-09-17)
footnote Full support
Opera Android – Full support
Opera Android 10.1 (Release date: 2010-11-09)
altname
altname Alternate name: experimental-webgl
Opera Android – Full support
Opera Android 14 (Release date: 2013-05-21)
footnote Full support
Safari on iOS – Full support
Safari on iOS 8 (Release date: 2014-09-17)
altname
altname Alternate name: experimental-webgl
Safari on iOS – Full support
Safari on iOS 8 (Release date: 2014-09-17)
footnote Full support
Samsung Internet – Full support
Samsung Internet 1 (Release date: 2013-04-27)
altname
altname Alternate name: experimental-webgl
Samsung Internet – Full support
Samsung Internet 2 (Release date: 2014-10-17)
footnote Full support
WebView Android – Full support
WebView Android 37 (Release date: 2014-09-03)
altname
altname Alternate name: experimental-webgl
WebView Android – Full support
WebView Android 37 (Release date: 2014-09-03)
footnote Full support
WebView on iOS – Full support
WebView on iOS 8 (Release date: 2014-09-17)
altname
altname Alternate name: experimental-webgl
WebView on iOS – Full support
WebView on iOS 8 (Release date: 2014-09-17)
footnote Full support
options.alpha parameter
Chrome – Full support
Chrome 32 (Release date: 2014-01-14)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – Full support
Firefox 30 (Release date: 2014-06-10)
footnote Full support
Opera – Full support
Opera 19 (Release date: 2014-01-28)
footnote Full support
Safari – Full support
Safari 10.1 (Release date: 2017-03-27)
footnote Full support
Chrome Android – Full support
Chrome Android 32 (Release date: 2014-01-15)
footnote Full support
Firefox for Android – Full support
Firefox for Android 30 (Release date: 2014-06-10)
footnote Full support
Opera Android – Full support
Opera Android 19 (Release date: 2014-01-28)
footnote Full support
Safari on iOS – Full support
Safari on iOS 10.3 (Release date: 2017-03-27)
footnote Full support
Samsung Internet – Full support
Samsung Internet 2 (Release date: 2014-10-17)
footnote Full support
WebView Android – Full support
WebView Android 37 (Release date: 2014-09-03)
footnote Full support
WebView on iOS – Full support
WebView on iOS 10.3 (Release date: 2017-03-27)
footnote Full support
options.desynchronized parameter
Chrome – Partial support
Chrome 75 – 80 (Release date: 2019-06-04)
footnote Partial support
footnote ChromeOS only
Chrome – Full support
Chrome 81 (Release date: 2020-04-07)
footnote
footnote ChromeOS and Windows
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 68 (Release date: 2020-04-22)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 75 (Release date: 2019-06-04)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 54 (Release date: 2019-10-18)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 11 (Release date: 2019-12-05)
footnote Full support
WebView Android – Full support
WebView Android 75 (Release date: 2019-06-04)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
options.failIfMajorPerformanceCaveat parameter
Chrome – Full support
Chrome 33 (Release date: 2014-02-20)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – Full support
Firefox 41 (Release date: 2015-09-22)
footnote Full support
Opera – Full support
Opera 20 (Release date: 2014-03-04)
footnote Full support
Safari – Full support
Safari 10.1 (Release date: 2017-03-27)
footnote Full support
Chrome Android – Full support
Chrome Android 33 (Release date: 2014-02-26)
footnote Full support
Firefox for Android – Full support
Firefox for Android 41 (Release date: 2015-09-22)
footnote Full support
Opera Android – Full support
Opera Android 20 (Release date: 2014-03-06)
footnote Full support
Safari on iOS – Full support
Safari on iOS 10.3 (Release date: 2017-03-27)
footnote Full support
Samsung Internet – Full support
Samsung Internet 2 (Release date: 2014-10-17)
footnote Full support
WebView Android – Full support
WebView Android 37 (Release date: 2014-09-03)
footnote Full support
WebView on iOS – Full support
WebView on iOS 10.3 (Release date: 2017-03-27)
footnote Full support
options.powerPreference parameter
Chrome – Partial support
Chrome 75 (Release date: 2019-06-04)
footnote Partial support
footnote Chrome respects the GPU hint on macOS only.
Edge – Partial support
Edge 79 (Release date: 2020-01-15)
footnote Partial support
footnote Edge respects the GPU hint on macOS only.
Firefox – Partial support
Firefox 63 (Release date: 2018-10-23)
footnote Partial support
footnote Firefox respects the GPU hint on macOS only.
Opera – Partial support
Opera 62 (Release date: 2019-06-27)
footnote Partial support
footnote Opera respects the GPU hint on macOS only.
Safari – Full support
Safari 10.1 (Release date: 2017-03-27)
footnote Full support
Chrome Android – Partial support
Chrome Android 75 (Release date: 2019-06-04)
footnote Partial support
footnote Chrome Android respects the GPU hint on macOS only.
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Partial support
Opera Android 54 (Release date: 2019-10-18)
footnote Partial support
footnote Opera Android respects the GPU hint on macOS only.
Safari on iOS – Full support
Safari on iOS 10.3 (Release date: 2017-03-27)
footnote Full support
Samsung Internet – Partial support
Samsung Internet 11 (Release date: 2019-12-05)
footnote Partial support
footnote Samsung Internet respects the GPU hint on macOS only.
WebView Android – Partial support
WebView Android 75 (Release date: 2019-06-04)
footnote Partial support
footnote WebView Android respects the GPU hint on macOS only.
WebView on iOS – Full support
WebView on iOS 10.3 (Release date: 2017-03-27)
footnote Full support
webgpu context
Chrome – Partial support
Chrome 113 (Release date: 2023-05-02)
footnote Partial support
footnote Supported on ChromeOS, macOS, and Windows.
footnote Supported on Linux (Intel Gen12+ GPUs only) since Chrome 144.
Edge – Partial support
Edge 113 (Release date: 2023-05-05)
footnote Partial support
footnote Supported on ChromeOS, macOS, and Windows.
footnote Supported on Linux (Intel Gen12+ GPUs only) since Edge 144.
Firefox – Partial support
Firefox 141 (Release date: 2025-07-22)
footnote Partial support
footnote Supported on Windows only, in all contexts except for service workers.
Opera – Partial support
Opera 99 (Release date: 2023-05-16)
footnote Partial support
footnote Supported on ChromeOS, macOS, and Windows.
footnote Supported on Linux (Intel Gen12+ GPUs only) since Opera 128.
Safari – Full support
Safari 26 (Release date: 2025-09-15)
footnote Full support
Chrome Android – Full support
Chrome Android 121 (Release date: 2024-01-23)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 81 (Release date: 2024-03-14)
footnote Full support
Safari on iOS – Full support
Safari on iOS 26 (Release date: 2025-09-15)
footnote Full support
Samsung Internet – Full support
Samsung Internet 25 (Release date: 2024-04-24)
footnote Full support
WebView Android – Full support
WebView Android 121 (Release date: 2024-01-23)
footnote Full support
WebView on iOS – Full support
WebView on iOS 26 (Release date: 2025-09-15)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.
Uses a non-standard name
Has more compatibility info.

See also