Rollup merge of #49312 - GuillaumeGomez:fix-ie11-search, r=QuietMisdreavus

Fix IE11 search

Fixes #49263.

r? @QuietMisdreavus

I got this code from: https://stackoverflow.com/a/30867255/7879548
This commit is contained in:
kennytm 2018-03-25 01:26:45 +08:00 committed by GitHub
commit 2580edfba0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,6 +49,13 @@
var themesWidth = null;
if (!String.prototype.startsWith) {
String.prototype.startsWith = function(searchString, position) {
position = position || 0;
return this.indexOf(searchString, position) === position;
};
}
function hasClass(elem, className) {
if (elem && className && elem.className) {
var elemClass = elem.className;