forked from select2/select2
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove support for legacy IE (select2#5834)
* Replace usage of $.trim with String.prototype.trim This officially drops support for Internet Explorer 8, since this method is not provided by that browser. This is one more step closer to removing the dependency on jQuery itself. * Replace $.isArray with Array.isArray Now that we no longer support IE8, we can rely on this method actually existing now. * Remove old getAttribute workaround for IE7 This has long been unsupported, and now that we don't care about IE8 with quirks mode, we can go back to expecting that `getAttribute` actually returns the string like it is supposed to. * Remove jQuery from Utils.copyNonInternalCssClasses This also simplifies the logic used to use more modern array methods to calculate the list of classes which need to be copied over to the destination object. * Remove unused imports * Remove use of jQuery.fn.is() * Replace $.inArray with Array.prototype.indexOf * Replace addClass, hasClass, removeClass with classList calls This replaces calls to the jQuery `getClass`, `hasClass`, and `removeClass` methods with the corresponding calls to `classList` methods on the elements that are referenced. There is one exception to this, specifically where results remove a class from any elements which may contain it, since that cannot be easily translated to use the `classList` syntax. * Remove legacy DOM modification tracking This removes the legacy tracking for `onpropertychange`, which was used by IE 8, to synchronize attribute changes from the `<select>` element back to Select2. This removes the legacy tracking of `DOMNodeInserted`, `DOMNodeRemoved`, and `DOMAttrModified` which was used by IE 9 and IE 10 for tracking when `<option>` elements were added and removed, as well as when attributes on the `<select>` element were synchronized. Now only the `MutationObserver` is in use for synchronizing changes to the `<select>` as well as changes to the `<option>` elements that it contains. * Replace $.map with Array.prototype.map
- Loading branch information
1 parent
f999ed8
commit f7cbd2c
Showing
20 changed files
with
118 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.