diff options
| author | Priyansh <[email protected]> | 2021-11-28 14:27:57 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-11-28 14:27:57 -0500 |
| commit | d53094ec16ba385faae2973ddee648698b32ab24 (patch) | |
| tree | 9fe907f4f5a4ed57fff915526f36eca9dd05f07e /js/src/toast.js | |
| parent | 52cd86f8710f8049a744b5bcb9f4a7ce19114b6e (diff) | |
| parent | 5290080d4df3047d04c8a232bca5dc7f8eaa4bc6 (diff) | |
| download | bootstrap-d53094ec16ba385faae2973ddee648698b32ab24.tar.xz bootstrap-d53094ec16ba385faae2973ddee648698b32ab24.zip | |
Merge branch 'twbs:main' into main
Diffstat (limited to 'js/src/toast.js')
| -rw-r--r-- | js/src/toast.js | 19 |
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) |
