Added isWindowOpen observers and toggle function.