KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I develop Chrome extension. I try to add event listener to chrome.runtime.onSuspend , but it is never called. I use the following code, but localStorage is not modified and there is no log messages in the console also (I use --enable-logging --v=1 to save log messages to the file). chrome.runtime.onSuspend.addListener(function() { localStorage["suspend"] = new Date(); console.log("On suspend"); }); Test box: WinXP SP3 x86 with Chrome 28.0.1500.72 m I've created test extension to easily reproduce this issue: manifest.json { "manifest_version": 2, "name": "Chrome onSuspend test", "version": "1.0", "background": { "scripts": ["background.js"] } } background.js chrome.runtime.onSuspend.addListener(function() { localStorage["suspend"] = new Date(); console.log("On suspend"); });
Tags (comma-separated)
Save Edits
Cancel