File tree 1 file changed +8
-4
lines changed
src/librustdoc/html/static/js
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -322,7 +322,6 @@ function preLoadCss(cssUrl) {
322
322
search = window . searchState . outputElement ( ) ;
323
323
}
324
324
switchDisplayedElement ( search ) ;
325
- window . searchState . mouseMovedAfterSearch = false ;
326
325
document . title = window . searchState . title ;
327
326
} ,
328
327
removeQueryParameters : ( ) => {
@@ -499,17 +498,22 @@ function preLoadCss(cssUrl) {
499
498
handleHashes ( ev ) ;
500
499
}
501
500
502
- // @ts -expect-error
501
+ /**
502
+ * @param {HTMLElement|null } elem
503
+ */
503
504
function openParentDetails ( elem ) {
504
505
while ( elem ) {
505
506
if ( elem . tagName === "DETAILS" ) {
507
+ // @ts -expect-error
506
508
elem . open = true ;
507
509
}
508
- elem = elem . parentNode ;
510
+ elem = elem . parentElement ;
509
511
}
510
512
}
511
513
512
- // @ts -expect-error
514
+ /**
515
+ * @param {string } id
516
+ */
513
517
function expandSection ( id ) {
514
518
openParentDetails ( document . getElementById ( id ) ) ;
515
519
}
You can’t perform that action at this time.
0 commit comments