access to the @window object by an hook