diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-06-21 20:08:11 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-21 20:08:11 +0900 |
| commit | 75f17ed9099a510bb3833a387bb4ffbf7ab564b1 (patch) | |
| tree | d9f17bfde3a373488290c80074f85ee784d58ce0 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | a7f789b5023226c585b9d5dd652054501c5e2e94 (diff) | |
| parent | 27dcebeb3e88b97420a6d8f9279102892e27c775 (diff) | |
| download | rust-75f17ed9099a510bb3833a387bb4ffbf7ab564b1.tar.gz rust-75f17ed9099a510bb3833a387bb4ffbf7ab564b1.zip | |
Rollup merge of #98124 - jsha:defer-crates, r=GuillaumeGomez
Improve loading of crates.js and sidebar-items.js Now that the "All Crates" dropdown is only rendered on the search results page, there is no need to load crates.js on most pages. Load it only on crate pages. Also, add the `defer` attribute so it does not block HTML parsing. For sidebar-items.js, move the script tag to `<head>`. Since it already has the defer attribute it won't block loading. The defer attribute does preserve ordering between scripts, so instead of the callback on load, it can set a global variable on load, which is slightly simpler. Also, since it is required to finish rendering the page, beginning its load earlier is better. Remove generation and handling of sidebar-vars. Everything there can be computed with information available in JS via other means. Remove the extra_scripts fields of the `Page` template. They were only used by source-script.js and source-files.js, which are now linked by the template based on whether it is rendering a source page. Remove the "other" wrapper in the sidebar. It was unnecessary. r? ```@GuillaumeGomez``` Demo: https://rustdoc.crud.net/jsha/defer-crates/std/index.html
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
