mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-25 21:09:06 +02:00
dist
This commit is contained in:
12
js/dist/util.js
vendored
12
js/dist/util.js
vendored
@@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0-beta): util.js
|
||||
@@ -5,7 +7,7 @@
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Util = function ($) {
|
||||
var Util = function () {
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
@@ -40,7 +42,7 @@ var Util = function ($) {
|
||||
if ($(event.target).is(this)) {
|
||||
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
|
||||
}
|
||||
return undefined;
|
||||
return undefined; // eslint-disable-line no-undefined
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -53,7 +55,7 @@ var Util = function ($) {
|
||||
var el = document.createElement('bootstrap');
|
||||
|
||||
for (var name in TransitionEndEvent) {
|
||||
if (el.style[name] !== undefined) {
|
||||
if (typeof el.style[name] !== 'undefined') {
|
||||
return {
|
||||
end: TransitionEndEvent[name]
|
||||
};
|
||||
@@ -115,7 +117,7 @@ var Util = function ($) {
|
||||
}
|
||||
|
||||
try {
|
||||
var $selector = $(selector);
|
||||
var $selector = $(document).find(selector);
|
||||
return $selector.length > 0 ? selector : null;
|
||||
} catch (error) {
|
||||
return null;
|
||||
@@ -132,7 +134,7 @@ var Util = function ($) {
|
||||
},
|
||||
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
|
||||
for (var property in configTypes) {
|
||||
if (configTypes.hasOwnProperty(property)) {
|
||||
if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
|
||||
var expectedTypes = configTypes[property];
|
||||
var value = config[property];
|
||||
var valueType = value && isElement(value) ? 'element' : toType(value);
|
||||
|
Reference in New Issue
Block a user