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/modal.js | |
parent | 7ad8967367dcd6ebccb9569096ebec0f627e35ac (diff) |
Prepare v5.0.0-alpha3 (#32122)v5.0.0-alpha3
Diffstat (limited to 'js/dist/modal.js')
-rw-r--r-- | js/dist/modal.js | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/js/dist/modal.js b/js/dist/modal.js index 568d3317c3..b7092857cc 100644 --- a/js/dist/modal.js +++ b/js/dist/modal.js @@ -1,5 +1,5 @@ /*! - * Bootstrap modal.js v5.0.0-alpha2 (https://getbootstrap.com/) + * Bootstrap modal.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) */ @@ -18,7 +18,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) * -------------------------------------------------------------------------- */ @@ -139,6 +139,14 @@ return null; }; + var onDOMContentLoaded = function onDOMContentLoaded(callback) { + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', callback); + } else { + callback(); + } + }; + function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } 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); } } @@ -151,7 +159,7 @@ */ var NAME = 'modal'; - var VERSION = '5.0.0-alpha2'; + var VERSION = '5.0.0-alpha3'; var DATA_KEY = 'bs.modal'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -752,26 +760,28 @@ data.show(this); }); - var $ = getjQuery(); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ - * add .modal to jQuery only if jQuery is present + * add .Modal 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] = Modal.jQueryInterface; - $.fn[NAME].Constructor = Modal; + if ($) { + var JQUERY_NO_CONFLICT = $.fn[NAME]; + $.fn[NAME] = Modal.jQueryInterface; + $.fn[NAME].Constructor = Modal; - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Modal.jQueryInterface; - }; - } + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Modal.jQueryInterface; + }; + } + }); return Modal; |