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:
parent
36cd65f786
commit
a3e4a1617b
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user