Add more window events for HTML5/Flash