Pass window instead of this and you can remove the jshint ignore.