Skip to content

Commit 2b84b82

Browse files
Use addEventListener uncapturederror (#503)
1 parent a1bafc9 commit 2b84b82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sample/util.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ export function quitIfWebGPUNotAvailable(
5757
device.lost.then((reason) => {
5858
fail(`Device lost ("${reason.reason}"):\n${reason.message}`);
5959
});
60-
device.onuncapturederror = (ev) => {
60+
device.addEventListener('uncapturederror', (ev) => {
6161
fail(`Uncaptured error:\n${ev.error.message}`);
62-
};
62+
});
6363
}
6464

6565
/** Fail by showing a console error, and dialog box if possible. */

0 commit comments

Comments
 (0)