File tree 1 file changed +5
-4
lines changed
src/librustdoc/html/static
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,7 @@ function getSearchElement() {
324
324
}
325
325
326
326
function handleEscape ( ev ) {
327
+ debugger ;
327
328
var help = getHelpElement ( ) ;
328
329
var search = getSearchElement ( ) ;
329
330
hideModal ( ) ;
@@ -390,8 +391,8 @@ function getSearchElement() {
390
391
return null ;
391
392
}
392
393
393
- document . onkeypress = handleShortcut ;
394
- document . onkeydown = handleShortcut ;
394
+ document . addEventListener ( "keypress" , handleShortcut ) ;
395
+ document . addEventListener ( "keydown" , handleShortcut ) ;
395
396
396
397
var handleSourceHighlight = ( function ( ) {
397
398
var prev_line_id = 0 ;
@@ -430,7 +431,7 @@ function getSearchElement() {
430
431
}
431
432
} ) ( ) ;
432
433
433
- document . onclick = function ( ev ) {
434
+ document . addEventListener ( "click" , function ( ev ) {
434
435
if ( hasClass ( ev . target , "collapse-toggle" ) ) {
435
436
collapseDocs ( ev . target , "toggle" ) ;
436
437
} else if ( hasClass ( ev . target . parentNode , "collapse-toggle" ) ) {
@@ -452,7 +453,7 @@ function getSearchElement() {
452
453
expandSection ( a . hash . replace ( / ^ # / , "" ) ) ;
453
454
}
454
455
}
455
- } ;
456
+ } ) ;
456
457
457
458
var x = document . getElementsByClassName ( "version-selector" ) ;
458
459
if ( x . length > 0 ) {
You can’t perform that action at this time.
0 commit comments