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:
parent
84dd17b56a
commit
0c61f58c11
1 changed files with 2 additions and 4 deletions
|
@ -275,8 +275,7 @@ function preLoadCss(cssUrl) {
|
||||||
document.title = searchState.titleBeforeSearch;
|
document.title = searchState.titleBeforeSearch;
|
||||||
// We also remove the query parameter from the URL.
|
// We also remove the query parameter from the URL.
|
||||||
if (browserSupportsHistoryApi()) {
|
if (browserSupportsHistoryApi()) {
|
||||||
history.replaceState(null, window.currentCrate + " - Rust",
|
history.replaceState(null, "", getNakedUrl() + window.location.hash);
|
||||||
getNakedUrl() + window.location.hash);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getQueryStringParams: () => {
|
getQueryStringParams: () => {
|
||||||
|
@ -378,8 +377,7 @@ function preLoadCss(cssUrl) {
|
||||||
searchState.clearInputTimeout();
|
searchState.clearInputTimeout();
|
||||||
switchDisplayedElement(null);
|
switchDisplayedElement(null);
|
||||||
if (browserSupportsHistoryApi()) {
|
if (browserSupportsHistoryApi()) {
|
||||||
history.replaceState(null, window.currentCrate + " - Rust",
|
history.replaceState(null, "", getNakedUrl() + window.location.hash);
|
||||||
getNakedUrl() + window.location.hash);
|
|
||||||
}
|
}
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
searchState.defocus();
|
searchState.defocus();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue