aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2021-12-10 07:42:08 +0200
committerGitHub <[email protected]>2021-12-10 07:42:08 +0200
commiteaa801c89975144ceb80f7a65b9c0f741e6ae96c (patch)
treea774cfd3a2465ae6607e14d32be81c39d71e6b9f /js/src
parent94d4fa3b100352cba4c03b23b229e137d520a13a (diff)
downloadbootstrap-eaa801c89975144ceb80f7a65b9c0f741e6ae96c.tar.xz
bootstrap-eaa801c89975144ceb80f7a65b9c0f741e6ae96c.zip
Toast: join multiple classList calls (#35507)
Diffstat (limited to 'js/src')
-rw-r--r--js/src/toast.js12
1 files changed, 3 insertions, 9 deletions
diff --git a/js/src/toast.js b/js/src/toast.js
index c45721c8f..ba376d05e 100644
--- a/js/src/toast.js
+++ b/js/src/toast.js
@@ -5,11 +5,7 @@
* --------------------------------------------------------------------------
*/
-import {
- defineJQueryPlugin,
- reflow,
- typeCheckConfig
-} from './util/index'
+import { defineJQueryPlugin, reflow, typeCheckConfig } from './util/index'
import EventHandler from './dom/event-handler'
import Manipulator from './dom/manipulator'
import BaseComponent from './base-component'
@@ -100,8 +96,7 @@ class Toast extends BaseComponent {
this._element.classList.remove(CLASS_NAME_HIDE) // @deprecated
reflow(this._element)
- this._element.classList.add(CLASS_NAME_SHOW)
- this._element.classList.add(CLASS_NAME_SHOWING)
+ this._element.classList.add(CLASS_NAME_SHOW, CLASS_NAME_SHOWING)
this._queueCallback(complete, this._element, this._config.animation)
}
@@ -119,8 +114,7 @@ class Toast extends BaseComponent {
const complete = () => {
this._element.classList.add(CLASS_NAME_HIDE) // @deprecated
- this._element.classList.remove(CLASS_NAME_SHOWING)
- this._element.classList.remove(CLASS_NAME_SHOW)
+ this._element.classList.remove(CLASS_NAME_SHOWING, CLASS_NAME_SHOW)
EventHandler.trigger(this._element, EVENT_HIDDEN)
}