` +
+ let output = `
` +
`
Results for ${escape(results.query.userQuery)}` +
`${typeFilter}
in ${crates} `;
if (results.query.error !== null) {
@@ -1732,14 +1723,14 @@ window.initSearch = function(rawSearchIndex) {
makeTabHeader(2, "In Return Types", ret_returned[1]) +
"
";
- var resultsElem = document.createElement("div");
+ const resultsElem = document.createElement("div");
resultsElem.id = "results";
resultsElem.appendChild(ret_others[0]);
resultsElem.appendChild(ret_in_args[0]);
resultsElem.appendChild(ret_returned[0]);
search.innerHTML = output;
- let crateSearch = document.getElementById("crate-search");
+ const crateSearch = document.getElementById("crate-search");
if (crateSearch) {
crateSearch.addEventListener("input", updateCrate);
}
@@ -1747,7 +1738,7 @@ window.initSearch = function(rawSearchIndex) {
// Reset focused elements.
searchState.focusedByTab = [null, null, null];
searchState.showResults(search);
- var elems = document.getElementById("titles").childNodes;
+ const elems = document.getElementById("titles").childNodes;
elems[0].onclick = function() { printTab(0); };
elems[1].onclick = function() { printTab(1); };
elems[2].onclick = function() { printTab(2); };
@@ -1761,8 +1752,8 @@ window.initSearch = function(rawSearchIndex) {
* @param {boolean} [forced]
*/
function search(e, forced) {
- var params = searchState.getQueryStringParams();
- var query = parseQuery(searchState.input.value.trim());
+ const params = searchState.getQueryStringParams();
+ const query = parseQuery(searchState.input.value.trim());
if (e) {
e.preventDefault();
@@ -1775,7 +1766,7 @@ window.initSearch = function(rawSearchIndex) {
return;
}
- var filterCrates = getFilterCrates();
+ let filterCrates = getFilterCrates();
// In case we have no information about the saved crate and there is a URL query parameter,
// we override it with the URL query parameter.
@@ -1789,7 +1780,7 @@ window.initSearch = function(rawSearchIndex) {
// Because searching is incremental by character, only the most
// recent search query is added to the browser history.
if (searchState.browserSupportsHistoryApi()) {
- var newURL = buildUrl(query.original, filterCrates);
+ const newURL = buildUrl(query.original, filterCrates);
if (!history.state && !params.search) {
history.pushState(null, "", newURL);
} else {
@@ -1808,17 +1799,17 @@ window.initSearch = function(rawSearchIndex) {
/**
* @type {Array