mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-04 22:57: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;
|
||||
classList.remove('bx-offscreen');
|
||||
classList.remove('bx-hide');
|
||||
classList.remove('bx-offscreen', 'bx-hide');
|
||||
classList.add('bx-show');
|
||||
}
|
||||
|
||||
@ -3506,8 +3505,7 @@ class Toast {
|
||||
Toast.#$wrapper.addEventListener('transitionend', e => {
|
||||
const classList = Toast.#$wrapper.classList;
|
||||
if (classList.contains('bx-hide')) {
|
||||
classList.remove('bx-show');
|
||||
classList.remove('bx-hide');
|
||||
classList.remove('bx-offscreen', 'bx-hide');
|
||||
classList.add('bx-offscreen');
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user