當Chrome顯示頁面「Error 106(net :: ERR_INTERNET_DISCONNECTED):Internet連接已丟失」時,是否有任何後臺擴展檢測到的問題。 ?我曾嘗試使用chrome.webRequest.onErrorOccurred.addListener
和chrome.webNavigation.onErrorOccurred.addListener
註冊偵聽器,但在發生「錯誤106」時都不會調用偵聽器。我的聽衆正在被正確調用以解決其他錯誤,例如「net :: ERR_NAME_NOT_RESOLVED」。檢測到「Error 106 net :: ERR_INTERNET_DISCONNECTED」)
我在Windows 7環境中針對Chrome 22.0.1229.94。更大的目標是在互聯網連接丟失時提供自定義消息(在單獨的選項卡中)。
你試過了'navigator.onLine'財產和/或'window.ononline' /'窗口。 onoffline'事件呢? –
羅布W,那些完美的工作。謝謝。 – trauble
我真的不會相信navigator.onLine,因爲我發現很多情況下,它並不代表真正的互聯網連接,但更多地連接到本地網絡/路由器 –