diff --git a/js/bootstrap-select.js b/js/bootstrap-select.js index d7de539f3..762ee26e6 100644 --- a/js/bootstrap-select.js +++ b/js/bootstrap-select.js @@ -239,16 +239,6 @@ if (!String.prototype.startsWith) { (function () { 'use strict'; // needed to support `apply`/`call` with `undefined`/`null` - var defineProperty = (function () { - // IE 8 only supports `Object.defineProperty` on DOM elements - try { - var object = {}; - var $defineProperty = Object.defineProperty; - var result = $defineProperty(object, object, object) && $defineProperty; - } catch (error) { - } - return result; - }()); var toString = {}.toString; var startsWith = function (search) { if (this == null) { @@ -280,8 +270,8 @@ } return true; }; - if (defineProperty) { - defineProperty(String.prototype, 'startsWith', { + if (Object.defineProperty) { + Object.defineProperty(String.prototype, 'startsWith', { 'value': startsWith, 'configurable': true, 'writable': true @@ -385,13 +375,6 @@ } el.dispatchEvent(event); - } else if (el.fireEvent) { // for IE8 - event = document.createEventObject(); - event.eventType = eventName; - el.fireEvent('on' + eventName, event); - } else { - // fall back to jQuery.trigger - this.trigger(eventName); } }; //