Skip to content

Commit

Permalink
spinner.js: replace function call with a callback
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Sep 23, 2021
1 parent 0da5ca5 commit 087a020
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/js/page/ui/spinner.js
Expand Up @@ -23,13 +23,11 @@ export default class Spinner {
this._showTimeout = null;
this.container.classList.add('d-none');

const animationEndListener = (event) => {
this.container.addEventListener('animationend', (event) => {
if (event.target === this.container) {
this.container.classList.add('d-none');
}
};

this.container.addEventListener('animationend', animationEndListener);
});
}

show(delay = 300) {
Expand Down

0 comments on commit 087a020

Please sign in to comment.