HTMLCanvasElement: contextrestored event

Khả dụng hạn chế

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Sự kiện contextrestored của Canvas API được phát ra nếu user agent khôi phục bộ nhớ nền cho một context CanvasRenderingContext2D.

Sau khi nhận sự kiện này, bạn có thể vẽ lại, lấy lại tài nguyên và khởi tạo lại trạng thái context.

Cú pháp

js
addEventListener("contextrestored", (event) => { })

oncontextrestored = (event) => { }