Passing `window` reference directly

Safari appears not to work when trying to bind to `this`.