aboutsummaryrefslogtreecommitdiff
path: root/js/src/modal.js
diff options
context:
space:
mode:
authorGeoSot <[email protected]>2022-11-06 20:31:43 +0200
committerGitHub <[email protected]>2022-11-06 20:31:43 +0200
commite81e7cda90026cdb2a05fcdadd2d66f48f0bbdc4 (patch)
treeea2459eebdf22e47438e3494a4955e173b5e9b66 /js/src/modal.js
parent2b21094074b1bdabf9ebc4095c29398f8b2de237 (diff)
downloadbootstrap-e81e7cda90026cdb2a05fcdadd2d66f48f0bbdc4.tar.xz
bootstrap-e81e7cda90026cdb2a05fcdadd2d66f48f0bbdc4.zip
Move `getElementFromSelector` & `getSelectorFromElement` to SelectorEngine (#36027)
* Move `getElementFromSelector` & getSelectorFromElement` inside selector-engine.js, in order to use SelectorEngine methods, avoiding raw querySelector usage * add `getMultipleElementsFromSelector` helper Co-authored-by: Julien Déramond <[email protected]>
Diffstat (limited to 'js/src/modal.js')
-rw-r--r--js/src/modal.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/src/modal.js b/js/src/modal.js
index 11efab20a..aba3b34a6 100644
--- a/js/src/modal.js
+++ b/js/src/modal.js
@@ -5,7 +5,7 @@
* --------------------------------------------------------------------------
*/
-import { defineJQueryPlugin, getElementFromSelector, isRTL, isVisible, reflow } from './util/index.js'
+import { defineJQueryPlugin, isRTL, isVisible, reflow } from './util/index.js'
import EventHandler from './dom/event-handler.js'
import SelectorEngine from './dom/selector-engine.js'
import ScrollBarHelper from './util/scrollbar.js'
@@ -336,7 +336,7 @@ class Modal extends BaseComponent {
*/
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
- const target = getElementFromSelector(this)
+ const target = SelectorEngine.getElementFromSelector(this)
if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault()