2D canvas opacity
Limited availability
The optional alpha
parameter of a 2D canvas's getContext()
method sets whether the canvas has an alpha transparency channel. If set to false
, then this permits the browser to optimize compositing for an opaque canvas.
To learn more, see
HTMLCanvasElement: getContext() method at MDN.
Compatibility
- Chrome 32 Released on 2014-01-14
- Chrome Android 32 Released on 2014-01-15
- Edge ≤79 Released before 2020-01-15
- Firefox 30 Released on 2014-06-10
- Firefox for Android 30 Released on 2014-06-10
- Safari ❌ Search for bugs Search for standards position
- Safari on iOS ❌ Search for bugs Search for standards position
Baseline availability blocked since June 2014 by Safari (125 months)
Specifications
- HTML Standard (#concept-canvas-alpha), from HTML Workstream (WHATWG).