Update getWindow and getNavigator function