misskey/packages/frontend/src/workers/test-webgl2.ts

8 lines
174 B
TypeScript

const canvas = new OffscreenCanvas(1, 1);
const gl = canvas.getContext('webgl2');
if (gl) {
postMessage({ result: true });
} else {
postMessage({ result: false });
}