about summary refs log tree commit diff
path: root/src/librustdoc/html/static
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2018-03-23 21:27:15 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2018-03-23 21:27:15 +0100
commit90588a9086270ecaebe1dab6bcff1dcbacfe1c0e (patch)
tree47d739520a0eb0b0ffd45dc72e76b16157c6f61c /src/librustdoc/html/static
parent55e1104dd918a809d2751d325c11d59c85485a2e (diff)
downloadrust-90588a9086270ecaebe1dab6bcff1dcbacfe1c0e.tar.gz
rust-90588a9086270ecaebe1dab6bcff1dcbacfe1c0e.zip
Fix IE11 search
Diffstat (limited to 'src/librustdoc/html/static')
-rw-r--r--src/librustdoc/html/static/main.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 21c1d9d670d..6c6c067f951 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -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;