mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-05 20:58:27 +02:00
Optimize classList.remove()
This commit is contained in:
@@ -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');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user