2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00
This commit is contained in:
XhmikosR
2020-03-28 12:29:08 +02:00
committed by GitHub
parent f761d8e801
commit 74afe149c4
59 changed files with 4462 additions and 4022 deletions
+3 -70
View File
@@ -1,6 +1,6 @@
/*!
* Bootstrap polyfill.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
@@ -32,58 +32,11 @@
};
/* istanbul ignore file */
var _Element$prototype = Element.prototype;
exports.matches = _Element$prototype.matches;
exports.closest = _Element$prototype.closest;
exports.find = Element.prototype.querySelectorAll;
exports.findOne = Element.prototype.querySelector;
exports.createCustomEvent = function createCustomEvent(eventName, params) {
var cEvent = new CustomEvent(eventName, params);
return cEvent;
};
if (typeof window.CustomEvent !== 'function') {
exports.createCustomEvent = function createCustomEvent(eventName, params) {
params = params || {
bubbles: false,
cancelable: false,
detail: null
};
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);
return evt;
};
}
var workingDefaultPrevented = function () {
var e = document.createEvent('CustomEvent');
e.initEvent('Bootstrap', true, true);
e.preventDefault();
return e.defaultPrevented;
}();
if (!workingDefaultPrevented) {
var origPreventDefault = Event.prototype.preventDefault;
Event.prototype.preventDefault = function () {
if (!this.cancelable) {
return;
}
origPreventDefault.call(this);
Object.defineProperty(this, 'defaultPrevented', {
get: function get() {
return true;
},
configurable: true
});
};
} // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
exports.findOne = Element.prototype.querySelector; // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
var defaultPreventedPreservedOnDispatch = function () {
var e = exports.createCustomEvent('Bootstrap', {
var e = new CustomEvent('Bootstrap', {
cancelable: true
});
var element = document.createElement('div');
@@ -95,26 +48,6 @@
return e.defaultPrevented;
}();
if (!exports.matches) {
exports.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
}
if (!exports.closest) {
exports.closest = function closest(selector) {
var element = this;
do {
if (exports.matches.call(element, selector)) {
return element;
}
element = element.parentElement || element.parentNode;
} while (element !== null && element.nodeType === 1);
return null;
};
}
var scopeSelectorRegex = /:scope\b/;
var supportScopeQuery = function () {