IW: Move a look of the window property to method

This allow use to stub that window object in testing.