aboutsummaryrefslogtreecommitdiff
path: root/js/src/toast.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/toast.js')
-rw-r--r--js/src/toast.js19
1 files changed, 6 insertions, 13 deletions
diff --git a/js/src/toast.js b/js/src/toast.js
index 0faecb8e4..c45721c8f 100644
--- a/js/src/toast.js
+++ b/js/src/toast.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.2): toast.js
+ * Bootstrap (v5.1.3): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -16,9 +16,7 @@ import BaseComponent from './base-component'
import { enableDismissTrigger } from './util/component-functions'
/**
- * ------------------------------------------------------------------------
* Constants
- * ------------------------------------------------------------------------
*/
const NAME = 'toast'
@@ -52,9 +50,7 @@ const Default = {
}
/**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
+ * Class definition
*/
class Toast extends BaseComponent {
@@ -69,7 +65,6 @@ class Toast extends BaseComponent {
}
// Getters
-
static get DefaultType() {
return DefaultType
}
@@ -83,7 +78,6 @@ class Toast extends BaseComponent {
}
// Public
-
show() {
const showEvent = EventHandler.trigger(this._element, EVENT_SHOW)
@@ -145,7 +139,6 @@ class Toast extends BaseComponent {
}
// Private
-
_getConfig(config) {
config = {
...Default,
@@ -212,7 +205,6 @@ class Toast extends BaseComponent {
}
// Static
-
static jQueryInterface(config) {
return this.each(function () {
const data = Toast.getOrCreateInstance(this, config)
@@ -228,13 +220,14 @@ class Toast extends BaseComponent {
}
}
+/**
+ * Data API implementation
+ */
+
enableDismissTrigger(Toast)
/**
- * ------------------------------------------------------------------------
* jQuery
- * ------------------------------------------------------------------------
- * add .Toast to jQuery only if jQuery is present
*/
defineJQueryPlugin(Toast)