add guards in case add/removeEventListener do not exist

This commit is contained in:
rolux 2015-02-21 16:05:07 +05:30
parent 90a49b2a4d
commit b00a3a0d19
1 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ appPanel
theme = legacyThemes[theme] || theme;
document.addEventListener('keydown', onKeydown);
document.addEventListener && document.addEventListener('keydown', onKeydown);
loadImages(function(images) {
loadScreen(images);
@ -433,7 +433,7 @@ appPanel
Ox.Fullscreen.bind('exit', pandora.UI.set);
pandora.site.sectionButtonsWidth = pandora.$ui.sectionButtons.width() + 8;
loadUserScript && pandora.loadUserScript();
document.removeEventListener('keydown', onKeydown);
document.removeEventListener && document.removeEventListener('keydown', onKeydown);
}
function loadBrowserMessage() {