aboutsummaryrefslogtreecommitdiff
path: root/js/src/popover.js
diff options
context:
space:
mode:
authorGeoSot <[email protected]>2021-11-25 19:14:02 +0200
committerGitHub <[email protected]>2021-11-25 19:14:02 +0200
commit94a596fbcb1011ba990da2078ba7e20b39dba2d9 (patch)
tree26af41580d5cae017e32e29cfef96178e897afa6 /js/src/popover.js
parentfa33e83f25faf8c378b99126fbd69977e667ad9a (diff)
downloadbootstrap-94a596fbcb1011ba990da2078ba7e20b39dba2d9.tar.xz
bootstrap-94a596fbcb1011ba990da2078ba7e20b39dba2d9.zip
Add a template factory helper to handle all template cases (#34519)
Co-authored-by: XhmikosR <[email protected]>
Diffstat (limited to 'js/src/popover.js')
-rw-r--r--js/src/popover.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/src/popover.js b/js/src/popover.js
index 144ec1cad..0b255a585 100644
--- a/js/src/popover.js
+++ b/js/src/popover.js
@@ -78,12 +78,14 @@ class Popover extends Tooltip {
return this.getTitle() || this._getContent()
}
- setContent(tip) {
- this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TITLE)
- this._sanitizeAndSetContent(tip, this._getContent(), SELECTOR_CONTENT)
+ // Private
+ _getContentForTemplate() {
+ return {
+ [SELECTOR_TITLE]: this.getTitle(),
+ [SELECTOR_CONTENT]: this._getContent()
+ }
}
- // Private
_getContent() {
return this._resolvePossibleFunction(this._config.content)
}