diff options
Diffstat (limited to 'vendor/twbs/bootstrap/js/src/util/index.js')
-rw-r--r-- | vendor/twbs/bootstrap/js/src/util/index.js | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/vendor/twbs/bootstrap/js/src/util/index.js b/vendor/twbs/bootstrap/js/src/util/index.js index a4ad9c941..7c317b016 100644 --- a/vendor/twbs/bootstrap/js/src/util/index.js +++ b/vendor/twbs/bootstrap/js/src/util/index.js @@ -1,6 +1,8 @@ +import SelectorEngine from '../dom/selector-engine' + /** * -------------------------------------------------------------------------- - * Bootstrap (v5.1.1): util/index.js + * Bootstrap (v5.0.2): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -118,7 +120,7 @@ const getElement = obj => { } if (typeof obj === 'string' && obj.length > 0) { - return document.querySelector(obj) + return SelectorEngine.findOne(obj) } return null @@ -187,18 +189,7 @@ const findShadowRoot = element => { const noop = () => {} -/** - * Trick to restart an element's animation - * - * @param {HTMLElement} element - * @return void - * - * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation - */ -const reflow = element => { - // eslint-disable-next-line no-unused-expressions - element.offsetHeight -} +const reflow = element => element.offsetHeight const getjQuery = () => { const { jQuery } = window |