Skip to content

Commit 2580edf

Browse files
authored
Rollup merge of rust-lang#49312 - GuillaumeGomez:fix-ie11-search, r=QuietMisdreavus
Fix IE11 search Fixes rust-lang#49263. r? @QuietMisdreavus I got this code from: https://stackoverflow.com/a/30867255/7879548
2 parents 177e20d + 90588a9 commit 2580edf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/librustdoc/html/static/main.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@
4949

5050
var themesWidth = null;
5151

52+
if (!String.prototype.startsWith) {
53+
String.prototype.startsWith = function(searchString, position) {
54+
position = position || 0;
55+
return this.indexOf(searchString, position) === position;
56+
};
57+
}
58+
5259
function hasClass(elem, className) {
5360
if (elem && className && elem.className) {
5461
var elemClass = elem.className;

0 commit comments

Comments
 (0)