1
我正在使用nodejs和socket.io在Windows 8上的聊天應用程序...
用戶可以隨時輕鬆連接和斷開聊天,但問題是我如何檢測到用戶通過ALT + F4或滑動或其他任何手段來關閉應用程序,以便在他關閉應用程序後立即斷開用戶連接。
我已經在計算器某處讀取如何知道一個JavaScript的Windows 8應用程序是否被用戶關閉
When an app is closed it is first suspended. Microsoft recommends that you
treat suspension as though the app will be closed because the OS may decide
to terminate the suspended app with no warning if there is resource contention.
所以我必須通過app.oncheckpoint..it的console.log()檢查的情況,當用戶關閉不執行或暫停的應用程序,但它被稱爲當用戶恢復應用程序。
Suggust me在哪裏把用戶斷開功能。
雅......我想你有重點。 – 2013-04-29 16:15:42