Add window method to detect whether the window object