parent
09c00d0a1b
commit
934e4be658
2 changed files with 4 additions and 1 deletions
|
@ -4,7 +4,9 @@
|
|||
*/
|
||||
|
||||
const canvas = globalThis.OffscreenCanvas && new OffscreenCanvas(1, 1);
|
||||
const gl = canvas.getContext('webgl2');
|
||||
// 環境によってはOffscreenCanvasが存在しないため
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||
const gl = canvas?.getContext('webgl2');
|
||||
if (gl) {
|
||||
postMessage({ result: true });
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue