1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-25 21:09:06 +02:00
This commit is contained in:
Mark Otto
2017-09-05 21:05:12 -07:00
parent fbd1f52f89
commit df47558ef6
39 changed files with 9916 additions and 5011 deletions

12
js/dist/util.js vendored
View File

@@ -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);