diff options
author | Mario <mario@mariovavti.com> | 2021-07-29 08:25:05 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-07-29 08:25:05 +0000 |
commit | d459dfac74e90c29950d49a82edc19fd913d435e (patch) | |
tree | 7bed5f2dbc318f87bbe0f4be2cde3dde09cd97c7 /vendor/twbs/bootstrap/js/dist/collapse.js | |
parent | cec2f0d894b80f3affeb60cff2d4afa49a2019a8 (diff) | |
download | volse-hubzilla-d459dfac74e90c29950d49a82edc19fd913d435e.tar.gz volse-hubzilla-d459dfac74e90c29950d49a82edc19fd913d435e.tar.bz2 volse-hubzilla-d459dfac74e90c29950d49a82edc19fd913d435e.zip |
update to bootstrap 5.0.2
Diffstat (limited to 'vendor/twbs/bootstrap/js/dist/collapse.js')
-rw-r--r-- | vendor/twbs/bootstrap/js/dist/collapse.js | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/vendor/twbs/bootstrap/js/dist/collapse.js b/vendor/twbs/bootstrap/js/dist/collapse.js index e2abc99c4..5a1beb7d3 100644 --- a/vendor/twbs/bootstrap/js/dist/collapse.js +++ b/vendor/twbs/bootstrap/js/dist/collapse.js @@ -1,5 +1,5 @@ /*! - * Bootstrap collapse.js v5.0.1 (https://getbootstrap.com/) + * Bootstrap collapse.js v5.0.2 (https://getbootstrap.com/) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ @@ -115,9 +115,18 @@ return null; }; + const DOMContentLoadedCallbacks = []; + const onDOMContentLoaded = callback => { if (document.readyState === 'loading') { - document.addEventListener('DOMContentLoaded', callback); + // add listener on the first call when the document is in loading state + if (!DOMContentLoadedCallbacks.length) { + document.addEventListener('DOMContentLoaded', () => { + DOMContentLoadedCallbacks.forEach(callback => callback()); + }); + } + + DOMContentLoadedCallbacks.push(callback); } else { callback(); } @@ -144,7 +153,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.1): collapse.js + * Bootstrap (v5.0.2): collapse.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -260,7 +269,7 @@ if (actives) { const tempActiveData = actives.find(elem => container !== elem); - activesData = tempActiveData ? Data__default['default'].get(tempActiveData, DATA_KEY) : null; + activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null; if (activesData && activesData._isTransitioning) { return; @@ -423,7 +432,7 @@ static collapseInterface(element, config) { - let data = Data__default['default'].get(element, DATA_KEY); + let data = Collapse.getInstance(element); const _config = { ...Default, ...Manipulator__default['default'].getDataAttributes(element), ...(typeof config === 'object' && config ? config : {}) @@ -470,7 +479,7 @@ const selector = getSelectorFromElement(this); const selectorElements = SelectorEngine__default['default'].find(selector); selectorElements.forEach(element => { - const data = Data__default['default'].get(element, DATA_KEY); + const data = Collapse.getInstance(element); let config; if (data) { |