mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Optimize classList.remove()
This commit is contained in:
parent
7271478ebc
commit
4add599f8e
@ -3485,8 +3485,7 @@ class Toast {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const classList = Toast.#$wrapper.classList;
|
const classList = Toast.#$wrapper.classList;
|
||||||
classList.remove('bx-offscreen');
|
classList.remove('bx-offscreen', 'bx-hide');
|
||||||
classList.remove('bx-hide');
|
|
||||||
classList.add('bx-show');
|
classList.add('bx-show');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3506,8 +3505,7 @@ class Toast {
|
|||||||
Toast.#$wrapper.addEventListener('transitionend', e => {
|
Toast.#$wrapper.addEventListener('transitionend', e => {
|
||||||
const classList = Toast.#$wrapper.classList;
|
const classList = Toast.#$wrapper.classList;
|
||||||
if (classList.contains('bx-hide')) {
|
if (classList.contains('bx-hide')) {
|
||||||
classList.remove('bx-show');
|
classList.remove('bx-offscreen', 'bx-hide');
|
||||||
classList.remove('bx-hide');
|
|
||||||
classList.add('bx-offscreen');
|
classList.add('bx-offscreen');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user