diff options
Diffstat (limited to 'js/src/util/index.js')
| -rw-r--r-- | js/src/util/index.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/js/src/util/index.js b/js/src/util/index.js index a1af87aa4..a4ad9c941 100644 --- a/js/src/util/index.js +++ b/js/src/util/index.js @@ -1,7 +1,6 @@ - /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.2): util/index.js + * Bootstrap (v5.1.1): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -188,7 +187,18 @@ const findShadowRoot = element => { const noop = () => {} -const reflow = element => element.offsetHeight +/** + * 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 getjQuery = () => { const { jQuery } = window |
