about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-04-20 11:08:28 +0200
committerGitHub <noreply@github.com>2021-04-20 11:08:28 +0200
commit5cc399465418af1b89eef1dec4d3451a915aae29 (patch)
treec07cd620a39335169cf3883cd39ae3db9cafc08c /src
parent9f03385499a14fc65ae7d1ac48503c68f788debe (diff)
parent20c362705279c93d62ada23798afc0cbaf200a75 (diff)
downloadrust-5cc399465418af1b89eef1dec4d3451a915aae29.tar.gz
rust-5cc399465418af1b89eef1dec4d3451a915aae29.zip
Rollup merge of #84340 - notriddle:patch-4, r=GuillaumeGomez
rustdoc: Show nag box on IE11

Rustdoc doesn't work on IE11. It's been broken for months, it isn't supported by the [tiered browser support list], it's even more severely broken on other Rust websites, and IE11 doesn't support the `<details>` tag that we want to use.

In the interest of honesty, let's give an actual error message for anyone on IE11.

[tiered browser support list]: https://github.com/rust-lang/rfcs/blob/master/text/1985-tiered-browser-support.md
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/html/layout.rs2
-rw-r--r--src/librustdoc/html/static/main.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs
index c50ebf1e6dc..dc29add9333 100644
--- a/src/librustdoc/html/layout.rs
+++ b/src/librustdoc/html/layout.rs
@@ -68,7 +68,7 @@ crate fn render<T: Print, S: Print>(
     </style>\
 </head>\
 <body class=\"rustdoc {css_class}\">\
-    <!--[if lte IE 8]>\
+    <!--[if lte IE 11]>\
     <div class=\"warning\">\
         This old browser is unsupported and will most likely display funky \
         things.\
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index f017fd846b1..be8d0a5996f 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -1281,7 +1281,7 @@ function hideThemeButtonState() {
         if (currentType) {
             currentType = currentType.getElementsByClassName("rust")[0];
             if (currentType) {
-                currentType.classList.forEach(function(item) {
+                onEachLazy(currentType.classList, function(item) {
                     if (item !== "main") {
                         className = item;
                         return true;