Skip to content

Commit 872ddf2

Browse files
Reexported functions are now declared directly as "windows" field
1 parent deaf5e2 commit 872ddf2

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/librustdoc/html/static/main.js

+6-11
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ function defocusSearchBar() {
535535
return s1_len + s2_len;
536536
}
537537

538-
function initSearch(rawSearchIndex) {
538+
window.initSearch = function(rawSearchIndex) {
539539
var MAX_LEV_DISTANCE = 3;
540540
var MAX_RESULTS = 200;
541541
var GENERICS_DATA = 1;
@@ -1930,12 +1930,11 @@ function defocusSearchBar() {
19301930
sidebar.appendChild(div);
19311931
}
19321932
}
1933-
}
1933+
};
19341934

1935-
window.initSearch = initSearch;
19361935

19371936
// delayed sidebar rendering.
1938-
function initSidebarItems(items) {
1937+
window.initSidebarItems = function(items) {
19391938
var sidebar = document.getElementsByClassName("sidebar-elems")[0];
19401939
var current = window.sidebarCurrent;
19411940

@@ -1997,9 +1996,7 @@ function defocusSearchBar() {
19971996
block("foreigntype", "Foreign Types");
19981997
block("keyword", "Keywords");
19991998
block("traitalias", "Trait Aliases");
2000-
}
2001-
2002-
window.initSidebarItems = initSidebarItems;
1999+
};
20032000

20042001
window.register_implementors = function(imp) {
20052002
var implementors = document.getElementById("implementors-list");
@@ -2699,7 +2696,7 @@ function defocusSearchBar() {
26992696
});
27002697
}
27012698

2702-
function addSearchOptions(crates) {
2699+
window.addSearchOptions = function(crates) {
27032700
var elem = document.getElementById("crate-search");
27042701

27052702
if (!elem) {
@@ -2744,9 +2741,7 @@ function defocusSearchBar() {
27442741
if (search_input) {
27452742
search_input.removeAttribute('disabled');
27462743
};
2747-
}
2748-
2749-
window.addSearchOptions = addSearchOptions;
2744+
};
27502745

27512746
function buildHelperPopup() {
27522747
var popup = document.createElement("aside");

0 commit comments

Comments
 (0)