mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Rollup merge of #110341 - notriddle:notriddle/main-js-replacestate, r=GuillaumeGomez
rustdoc: stop passing a title to `replaceState` second argument As described on [MDN's replaceState page], this parameter is not currently used, and the empty string is "safe against future changes to the method." [MDN's replaceState page]: https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
This commit is contained in:
commit
ee9b804826
@ -275,8 +275,7 @@ function preLoadCss(cssUrl) {
|
||||
document.title = searchState.titleBeforeSearch;
|
||||
// We also remove the query parameter from the URL.
|
||||
if (browserSupportsHistoryApi()) {
|
||||
history.replaceState(null, window.currentCrate + " - Rust",
|
||||
getNakedUrl() + window.location.hash);
|
||||
history.replaceState(null, "", getNakedUrl() + window.location.hash);
|
||||
}
|
||||
},
|
||||
getQueryStringParams: () => {
|
||||
@ -378,8 +377,7 @@ function preLoadCss(cssUrl) {
|
||||
searchState.clearInputTimeout();
|
||||
switchDisplayedElement(null);
|
||||
if (browserSupportsHistoryApi()) {
|
||||
history.replaceState(null, window.currentCrate + " - Rust",
|
||||
getNakedUrl() + window.location.hash);
|
||||
history.replaceState(null, "", getNakedUrl() + window.location.hash);
|
||||
}
|
||||
ev.preventDefault();
|
||||
searchState.defocus();
|
||||
|
Loading…
Reference in New Issue
Block a user