Detecting Chrome browser exit? -
i tried nil seems work me. tried observe closing of browsing detecting window closing code below not work me. doing wrong , there solution observe chrome closing?
chrome.windows.onremoved.addlistener(function(windowid){ alert("browser exit!"); });
your general problem quitting browser means browser can no longer run script check if has quit yet -- it's trying inquire person if they've died: reply (if one) ever going "no".
one solution might seek long-running background page background
permission:
makes chrome start , and shut downwards late, apps , extensions can have longer life.
when installed hosted app, packaged app, or extension has "background" permission, chrome runs (invisibly) user logs computer—before user launches chrome. "background" permission makes chrome go on running (even after lastly window closed) until user explicitly quits chrome.
this permission allows chrome maintain running extension after browser windows have closed. normally, chrome can things when has windows open, run problem of chrome beingness unable observe when windows have closed (as explained above). background permission, chrome retains ability run extension code when windows have closed.
google-chrome-extension
No comments:
Post a Comment