diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-03-20 19:00:09 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-03-20 19:00:09 +0900 |
| commit | 6015254e59ba0526efbfa139c89546458663ccbd (patch) | |
| tree | 97adc609448eb3ce96730051193042c9eec470db /packages/frontend/src/utility/snowfall-effect.ts | |
| parent | Update eslint.config.js (diff) | |
| download | misskey-6015254e59ba0526efbfa139c89546458663ccbd.tar.gz misskey-6015254e59ba0526efbfa139c89546458663ccbd.tar.bz2 misskey-6015254e59ba0526efbfa139c89546458663ccbd.zip | |
lint fixes
Diffstat (limited to 'packages/frontend/src/utility/snowfall-effect.ts')
| -rw-r--r-- | packages/frontend/src/utility/snowfall-effect.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/frontend/src/utility/snowfall-effect.ts b/packages/frontend/src/utility/snowfall-effect.ts index d88bdb6660..5c86969876 100644 --- a/packages/frontend/src/utility/snowfall-effect.ts +++ b/packages/frontend/src/utility/snowfall-effect.ts @@ -156,7 +156,7 @@ export class SnowfallEffect { easing: 0.0005, }; /** - * @throws {Error} - Thrown when it fails to get WebGL context for the canvas + * @throws {Error} - Thrown when it fails to get WebGL context for the canvas */ constructor(options: { sakura?: boolean; @@ -172,7 +172,7 @@ export class SnowfallEffect { const gl = canvas.getContext('webgl2', { antialias: true }); if (gl == null) throw new Error('Failed to get WebGL context'); - document.body.append(canvas); + window.document.body.append(canvas); this.canvas = canvas; this.gl = gl; @@ -190,7 +190,7 @@ export class SnowfallEffect { } private initCanvas(): HTMLCanvasElement { - const canvas = document.createElement('canvas'); + const canvas = window.document.createElement('canvas'); Object.assign(canvas.style, { position: 'fixed', |