diff options
| author | Kang Seonghoon <public+git@mearie.org> | 2015-03-07 23:01:31 +0900 |
|---|---|---|
| committer | Kang Seonghoon <public+git@mearie.org> | 2015-03-07 23:01:31 +0900 |
| commit | a3e4a1617b3f9f638c6c4b707bbd3a496ca4bbbd (patch) | |
| tree | 2dc5fbe897f9fff036f5cb144cc43752ded6b9fe | |
| parent | 36cd65f78665b992e67ef941ee0aed6522ef1a8c (diff) | |
| download | rust-a3e4a1617b3f9f638c6c4b707bbd3a496ca4bbbd.tar.gz rust-a3e4a1617b3f9f638c6c4b707bbd3a496ca4bbbd.zip | |
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>.
| -rw-r--r-- | src/librustdoc/html/render.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 435317c4fb6..d60f9ad50a1 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -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)); } |
