mirror of
https://github.com/paricafe/misskey.git
synced 2024-12-01 22:56:43 -06:00
934e4be658
Fix #11846
14 lines
450 B
TypeScript
14 lines
450 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
const canvas = globalThis.OffscreenCanvas && new OffscreenCanvas(1, 1);
|
|
// 環境によってはOffscreenCanvasが存在しないため
|
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
const gl = canvas?.getContext('webgl2');
|
|
if (gl) {
|
|
postMessage({ result: true });
|
|
} else {
|
|
postMessage({ result: false });
|
|
}
|