hotkeys.js: use DOMContentLoaded so images don't delay script
Instead of the load event, which waits until all assets are finished loading in order for script to start.
This commit is contained in:
parent
c2ca47c5d3
commit
786d3eb445
@ -27,6 +27,6 @@ function onKeyDown(e) {
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('load', function() {
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
document.addEventListener('keydown', onKeyDown);
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user