Skip to content

Commit 8cb9b83

Browse files
authored
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
2 parents 0615e6b + 90588a9 commit 8cb9b83

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/librustdoc/html/static/main.js

+7
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)