diff options
author | Johann-S <johann.servoire@gmail.com> | 2019-09-04 17:58:29 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2020-11-29 21:58:26 +0300 |
commit | 9f6b342dc710e4334b37ded90136efa1127a47cd (patch) | |
tree | cb5d8c8bddf356dd3f8c2289b99e9f9793fba6c7 /js/src/popover.js | |
parent | c63aebc86ba05f0ebb420add653b80804c6a0cff (diff) |
create a base component
Diffstat (limited to 'js/src/popover.js')
-rw-r--r-- | js/src/popover.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/js/src/popover.js b/js/src/popover.js index 46b693e696..bae5537aa2 100644 --- a/js/src/popover.js +++ b/js/src/popover.js @@ -108,7 +108,7 @@ class Popover extends Tooltip { this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle()) let content = this._getContent() if (typeof content === 'function') { - content = content.call(this.element) + content = content.call(this._element) } this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content) @@ -123,7 +123,7 @@ class Popover extends Tooltip { } _getContent() { - return this.element.getAttribute('data-bs-content') || + return this._element.getAttribute('data-bs-content') || this.config.content } @@ -161,10 +161,6 @@ class Popover extends Tooltip { } }) } - - static getInstance(element) { - return Data.getData(element, DATA_KEY) - } } /** |