about summary refs log tree commit diff
path: root/src/librustdoc/html/static/js
AgeCommit message (Collapse)AuthorLines
2025-06-16rustdoc: add ways of collapsing all impl blocksbinarycat-6/+22
either shift+click the Summary button, or use the `_` key. this collapses everything, including (inherent) impl blocks. no need for a special "expand all impl blocks" method, as impl blocks are expanded during regular "expand all". doing "expand all" -> "collapse all" will always result in only impl blocks being expaned. some of the html is split up a bit awkwardly to try to avoid introducing new whitespaces nodes, which could affect display. Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2025-06-16Add comment to prevent having code other than `initSearch` at the end of ↵Guillaume Gomez-0/+4
`search.js`
2025-06-14Fix random failure when JS code is executed when the whole file was not read yetGuillaume Gomez-37/+37
2025-06-10rustdoc search: prefer stable items in search resultsbinarycat-2/+24
fixes https://github.com/rust-lang/rust/issues/138067
2025-05-27scrape-examples.js: fix typoslolbinarycat-2/+2
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2025-05-22scrape-examples.js: add another nonnull() invokationbinarycat-1/+1
2025-05-22fix typobinarycat-4/+5
2025-05-21rustdoc js: add rustdoc.ScrapedLoc typebinarycat-1/+5
2025-05-21rustdoc js: add ScrapedLoc typebinarycat-4/+16
2025-05-21scrape-examples.js: give each function a signaturebinarycat-9/+24
2025-05-10rustdoc: Fix links in trait impl docsSpecificProtagonist-1/+3
2025-04-02rustdoc js: satisfy eslintbinarycat-4/+4
2025-04-02settings.js: fix whitespacebinarycat-1/+1
2025-04-02settings.js: add elemContainsTarget utility functionbinarycat-6/+15
this allows us to eliminate the last 3 @ts-expect-error in this file.
2025-04-02main.js: make hideAllModals docs clearerbinarycat-1/+1
"true" looks like a string value, `true` makes it more clear that we are talking about the actual boolean value.
2025-04-02settings.js: make top-level code typecheckbinarycat-9/+13
With this, almost the entire file is fully typechecked, the only exception being the Element.contains(EventTarget) pattern that is used several times, those are annotated with @ts-expect-error
2025-04-02settings.js: add some null checks to buildSettingsPagebinarycat-2/+8
2025-04-02settings.js: refactor settingsBlurHandlerbinarycat-5/+14
changes: * Add type signature * Add null checks * getHelpButton and getSettingsButton are only called once, which should marginally improve performance due to less queries. unfortunatly 2 @ts-expect-error was needed, as typescript is unaware the EventTarget is likely an Element.
2025-04-02settings.js: remove dead code for adding <hr> to settings pagebinarycat-5/+0
2025-04-02settings.js: add new rustdoc.Setting interfacebinarycat-17/+36
2025-04-02settings.js: begin typechecking migrationbinarycat-7/+19
this also makes `changeSetting` more robust in case it somehow gets called before `main.js` has finished loading.
2025-03-27search.js: revert usage of nonundef for now (not available under test)binarycat-2/+3
specifically, `storage.js` is not loaded during `rustdoc-js` and `rustdoc-js-std` tests.
2025-03-26satisfy eslintbinarycat-3/+3
2025-03-24search.js: fix whitespacebinarycat-1/+1
2025-03-24search.js: give type annotation to newSolutionsbinarycat-2/+2
2025-03-24search.js: give type to unifiedGenericsMgensbinarycat-2/+1
2025-03-24search.js: fix return type of unifyFunctionTypesbinarycat-2/+1
2025-03-24search.js: use @type instead of @ts-expect-errorbinarycat-5/+1
2025-03-24search.js: fix signature of pushTextbinarycat-9/+5
2025-03-24search.js: refactor transformResultsbinarycat-14/+27
2025-03-24search.js: remove another Map.has() and @ts-expect-errorbinarycat-3/+3
2025-03-24search.js(query parser): rethrow error if it isn't a string arraybinarycat-3/+7
only errors that are string arrays are intended to be shown to the user, other errors are bugs, and will be shown in the console as usual.
2025-03-24search.js: add undef2null and eliminate more @ts-expect-errorbinarycat-10/+21
2025-03-24search.js: refactor handling of rawPaths in buildIndexbinarycat-20/+22
2025-03-24search.js: improve typechecking by avoiding Map.hasbinarycat-13/+8
2025-03-24rustdoc js: add nonundef and use it to remove a ts-expect-errorbinarycat-5/+28
2025-03-14rustdoc js: add nonnull helper and typecheck src-script.jsbinarycat-9/+70
2025-03-10main.js: remove searchState from globals.binarycat-1/+1
2025-03-10main.js: typecheck things related to window.register_type_implsbinarycat-8/+10
2025-03-10rustdoc.d.ts: add window.{register_implementors,pending_implementors}binarycat-3/+17
2025-03-10rustdoc.d.ts: window.SIDEBAR_ITEMS may exist.binarycat-1/+2
2025-03-10main.js: handle document.activeElement being nullbinarycat-2/+2
this is technically possible if someone sticks rustdoc in an iframe, i think?
2025-03-10main.js(isDisplayed): coerce truthy values to booleanbinarycat-3/+2
2025-03-10main.js: always refer to searchState through window.searchStatebinarycat-10/+5
2025-03-10main.js: handleEscape and handleShortcut accept KeyboardEventbinarycat-2/+6
2025-03-10main.js: give type signatures to a few helper functionsbinarycat-4/+8
2025-03-10main.js: don't set mouseMovedAfterSearch, as it is never readbinarycat-1/+0
2025-03-10main.js: insertAfter needs non-root referenceNodebinarycat-4/+1
2025-03-04search.js: remove incorrect outdated commentbinarycat-2/+0
2025-03-04search.js: give RawSearchIndexCrate.a an index signaturebinarycat-4/+2