1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-25 04:51:39 +02:00

Release v5.0.2 (#34276)

* Bump version to v5.0.2.

* Dist
This commit is contained in:
XhmikosR
2021-06-22 21:29:16 +03:00
committed by GitHub
parent 16d5041a76
commit 688bce4fa6
111 changed files with 3152 additions and 2850 deletions

19
js/dist/scrollspy.js vendored
View File

@@ -1,5 +1,5 @@
/*!
* Bootstrap scrollspy.js v5.0.1 (https://getbootstrap.com/)
* Bootstrap scrollspy.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)
*/
@@ -18,7 +18,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): util/index.js
* Bootstrap (v5.0.2): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -117,9 +117,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();
}
@@ -146,7 +155,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.1): scrollspy.js
* Bootstrap (v5.0.2): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -361,7 +370,7 @@
static jQueryInterface(config) {
return this.each(function () {
const data = ScrollSpy.getInstance(this) || new ScrollSpy(this, typeof config === 'object' ? config : {});
const data = ScrollSpy.getOrCreateInstance(this, config);
if (typeof config !== 'string') {
return;