Event listeners to window instead of document