Skip to content

Commit a3e4a16

Browse files
committed
rustdoc: Fixed an asynchronous loading of rustdoc sidebars.
We require the *deferred* loading, not just an opportunistic asynchronous loading. I think `<script defer>` is safe to use, according to <http://caniuse.com/#feat=script-defer>.
1 parent 36cd65f commit a3e4a16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/html/render.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2247,7 +2247,7 @@ impl<'a> fmt::Display for Sidebar<'a> {
22472247
// there is no sidebar-items.js beyond the crate root path
22482248
// FIXME maybe dynamic crate loading can be merged here
22492249
} else {
2250-
try!(write!(fmt, "<script async src=\"{path}sidebar-items.js\"></script>",
2250+
try!(write!(fmt, "<script defer src=\"{path}sidebar-items.js\"></script>",
22512251
path = relpath));
22522252
}
22532253

0 commit comments

Comments
 (0)