diff options
author | XhmikosR <xhmikosr@gmail.com> | 2020-11-11 20:07:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-11 20:07:37 +0300 |
commit | 384eccbfaf3f234944f8d60ac70dd7966814c994 (patch) | |
tree | 6c05c77c6e4dda8915c0ae701e6e3361dbd41559 /js/dist/tab.js | |
parent | 7ad8967367dcd6ebccb9569096ebec0f627e35ac (diff) |
Prepare v5.0.0-alpha3 (#32122)v5.0.0-alpha3
Diffstat (limited to 'js/dist/tab.js')
-rw-r--r-- | js/dist/tab.js | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/js/dist/tab.js b/js/dist/tab.js index a6e8133f71..359beb0ed5 100644 --- a/js/dist/tab.js +++ b/js/dist/tab.js @@ -1,5 +1,5 @@ /*! - * Bootstrap tab.js v5.0.0-alpha2 (https://getbootstrap.com/) + * Bootstrap tab.js v5.0.0-alpha3 (https://getbootstrap.com/) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ @@ -17,7 +17,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.0-alpha2): util/index.js + * Bootstrap (v5.0.0-alpha3): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -100,6 +100,14 @@ return null; }; + var onDOMContentLoaded = function onDOMContentLoaded(callback) { + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', callback); + } else { + callback(); + } + }; + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } @@ -110,7 +118,7 @@ */ var NAME = 'tab'; - var VERSION = '5.0.0-alpha2'; + var VERSION = '5.0.0-alpha3'; var DATA_KEY = 'bs.tab'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -309,26 +317,28 @@ var data = Data__default['default'].getData(this, DATA_KEY) || new Tab(this); data.show(); }); - var $ = getjQuery(); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ - * add .tab to jQuery only if jQuery is present + * add .Tab to jQuery only if jQuery is present */ - /* istanbul ignore if */ + onDOMContentLoaded(function () { + var $ = getjQuery(); + /* istanbul ignore if */ - if ($) { - var JQUERY_NO_CONFLICT = $.fn[NAME]; - $.fn[NAME] = Tab.jQueryInterface; - $.fn[NAME].Constructor = Tab; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[NAME]; + $.fn[NAME] = Tab.jQueryInterface; + $.fn[NAME].Constructor = Tab; - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Tab.jQueryInterface; - }; - } + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Tab.jQueryInterface; + }; + } + }); return Tab; |