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>.
This commit is contained in:
Kang Seonghoon 2015-03-07 23:01:31 +09:00
parent 36cd65f786
commit a3e4a1617b

View File

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