contextlost and contextrestored
Limited availability
The contextlost
event for <canvas>
fires when the canvas backing storage is lost, while the contextrestored
event fires when it is recreated.
To learn more, see
HTMLCanvasElement: webglcontextlost event,
HTMLCanvasElement: webglcontextrestored event at MDN.
Compatibility
- Chrome 99 Released on 2022-03-01
- Chrome Android 99 Released on 2022-03-01
- Edge 99 Released on 2022-03-03
- Firefox 125 Released on 2024-04-16
- Firefox for Android 125 Released on 2024-04-16
- Safari ❌ Search for bugs Search for standards position
- Safari on iOS ❌ Search for bugs Search for standards position
Baseline availability blocked since April 2024 by Safari (7 months)
Specifications
- HTML Standard (#context-lost-steps), from HTML Workstream (WHATWG).