diff --git a/lib/NavigatorWatcher.js b/lib/NavigatorWatcher.js index d238a679d24..5a23c7933b4 100644 --- a/lib/NavigatorWatcher.js +++ b/lib/NavigatorWatcher.js @@ -43,7 +43,8 @@ class NavigatorWatcher { this._initialLoaderId = frame._loaderId; this._timeout = typeof options.timeout === 'number' ? options.timeout : 30000; this._eventListeners = [ - helper.addEventListener(this._frameManager, FrameManager.Events.LifecycleEvent, this._checkLifecycleComplete.bind(this)) + helper.addEventListener(this._frameManager, FrameManager.Events.LifecycleEvent, this._checkLifecycleComplete.bind(this)), + helper.addEventListener(this._frameManager, FrameManager.Events.FrameDetached, this._checkLifecycleComplete.bind(this)) ]; const lifecycleCompletePromise = new Promise(fulfill => {