Use {once: true} in some event listeners

This commit is contained in:
redphx
2024-07-02 17:20:23 +07:00
parent 277c777121
commit d31a06be89
2 changed files with 2 additions and 4 deletions

View File

@@ -57,7 +57,7 @@ export class Screenshot {
return;
}
$player.parentElement!.addEventListener('animationend', this.#onAnimationEnd);
$player.parentElement!.addEventListener('animationend', this.#onAnimationEnd, { once: true });
$player.parentElement!.classList.add('bx-taking-screenshot');
const canvasContext = Screenshot.#canvasContext;