Skip to content

Commit da5da99

Browse files
committed
main.js: handleEscape and handleShortcut accept KeyboardEvent
1 parent cf7f3cf commit da5da99

File tree

1 file changed

+6
-2
lines changed
  • src/librustdoc/html/static/js

1 file changed

+6
-2
lines changed

Diff for: src/librustdoc/html/static/js/main.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,9 @@ function preLoadCss(cssUrl) {
518518
openParentDetails(document.getElementById(id));
519519
}
520520

521-
// @ts-expect-error
521+
/**
522+
* @param {KeyboardEvent} ev
523+
*/
522524
function handleEscape(ev) {
523525
// @ts-expect-error
524526
searchState.clearInputTimeout();
@@ -530,7 +532,9 @@ function preLoadCss(cssUrl) {
530532
window.hideAllModals(true); // true = reset focus for tooltips
531533
}
532534

533-
// @ts-expect-error
535+
/**
536+
* @param {KeyboardEvent} ev
537+
*/
534538
function handleShortcut(ev) {
535539
// Don't interfere with browser shortcuts
536540
const disableShortcuts = getSettingValue("disable-shortcuts") === "true";

0 commit comments

Comments
 (0)