Skip to content

Commit fdb21b6

Browse files
authored
Rollup merge of rust-lang#42080 - pravic:jquery-removal-fix, r=frewsxcv
Fix regression introduced by jQuery removal Fixes rust-lang#42078. Follows rust-lang#41307. r? @steveklabnik cc @frewsxcv
2 parents 2b9c39b + 1eb6639 commit fdb21b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustdoc/html/static/main.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,14 @@
215215
} else if (ev.target.tagName === 'SPAN' && hasClass(ev.target.parentNode, 'line-numbers')) {
216216
var prev_id = 0;
217217

218-
function set_fragment(name) {
218+
var set_fragment = function (name) {
219219
if (browserSupportsHistoryApi()) {
220220
history.replaceState(null, null, '#' + name);
221221
window.hashchange();
222222
} else {
223223
location.replace('#' + name);
224224
}
225-
}
225+
};
226226

227227
var cur_id = parseInt(ev.target.id, 10);
228228

@@ -685,7 +685,7 @@
685685
}
686686

687687
function escape(content) {
688-
let h1 = document.createElement('h1');
688+
var h1 = document.createElement('h1');
689689
h1.textContent = content;
690690
return h1.innerHTML;
691691
}

0 commit comments

Comments
 (0)