Skip to content

Commit

Permalink
Fix IE11 search
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Mar 23, 2018
1 parent 55e1104 commit 90588a9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 90588a9

Please sign in to comment.