diff options
Diffstat (limited to 'js/src/base-component.js')
| -rw-r--r-- | js/src/base-component.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/js/src/base-component.js b/js/src/base-component.js index 0a1c17357..3c5eb460a 100644 --- a/js/src/base-component.js +++ b/js/src/base-component.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.1.2): base-component.js + * Bootstrap (v5.1.3): base-component.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -13,12 +13,14 @@ import { import EventHandler from './dom/event-handler' /** - * ------------------------------------------------------------------------ * Constants - * ------------------------------------------------------------------------ */ -const VERSION = '5.1.2' +const VERSION = '5.1.3' + +/** + * Class definition + */ class BaseComponent { constructor(element) { @@ -32,6 +34,7 @@ class BaseComponent { Data.set(this._element, this.constructor.DATA_KEY, this) } + // Public dispose() { Data.remove(this._element, this.constructor.DATA_KEY) EventHandler.off(this._element, this.constructor.EVENT_KEY) @@ -45,8 +48,7 @@ class BaseComponent { executeAfterTransition(callback, element, isAnimated) } - /** Static */ - + // Static static getInstance(element) { return Data.get(getElement(element), this.DATA_KEY) } @@ -60,7 +62,7 @@ class BaseComponent { } static get NAME() { - throw new Error('You have to implement the static method "NAME", for each component!') + throw new Error('You have to implement the static method "NAME" for each component!') } static get DATA_KEY() { |
