GPUDevice: sự kiện uncapturederror
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Note: This feature is available in Web Workers.
Sự kiện uncapturederror của giao diện GPUDevice được kích hoạt khi có lỗi được ném ra nhưng không bị một GPU error scope nào quan sát, nhằm cung cấp cách báo cáo các lỗi bất ngờ.
Ví dụ
js
device.addEventListener("uncapturederror", (event) => {
console.error(event.error);
});
Đặc tả
| Specification |
|---|
| WebGPU> # dom-gpudevice-onuncapturederror> |