DOM GeometryBaseline · Widely available
The DOMMatrix, DOMPoint, DOMQuad and DOMRect APIs represent points, rectangles, quadrilaterals and transformation matrices within JavaScript. They can be used in transformations in CSS, <canvas>, and SVG.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jan 15, 2020. Widely available since Jul 15, 2022.
Browser support
DesktopChrome
1–60Not supported
61+Supportedsince Sep 5, 2017
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
1–32Not supported
33+Supportedsince Oct 14, 2014
Current: 157Safari
1–10.1Not supported
11+Supportedsince Sep 19, 2017
Current: 27MobileChrome Android
18–60Not supported
61+Supportedsince Sep 5, 2017
Current: 155Firefox Android
4–32Not supported
33+Supportedsince Oct 14, 2014
Current: 157Safari iOS
1–10.3Not supported
11+Supportedsince Sep 19, 2017
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: DOMMatrix.
Feature detection
JS · check before using
if ("DOMMatrix" in globalThis) {
// DOMMatrix is available
} else {
// load a polyfill or use a fallback
}Sub-features
Support for each part of the feature (140). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| DOMMatrix | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.DOMMatrix | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.a | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.b | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.c | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.d | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.e | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.f | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.fromFloat32Array_static | 61 | 79 | 69 | 11 | 61 | 79 | 11 |
| DOMMatrix.fromFloat64Array_static | 61 | 79 | 69 | 11 | 61 | 79 | 11 |
| DOMMatrix.fromMatrix_static | 61 | 79 | 69 | 11 | 61 | 79 | 11 |
| DOMMatrix.invertSelf | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.m11 | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.m12 | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.m13 | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.m14 | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.m21 | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.m22 | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.m23 | 61 | 79 | 33 | 11 | 61 | 33 | 11 |
| DOMMatrix.m24 | 61 | 79 | 33 | 11 | 61 | 33 | 11 |