I am trying to write a Chrome extension which detects process crashes.
First i went to about:flags
page of Chrome and enabled "Experimental Extension APIs".
This is the extension I wrote:
manifest.json
:
{
"manifest_version": 2,
"name": "CrashDetect",
"description": "Detects crashes in processes.",
"version": "1.0",
"permissions": [
"experimental","tabs"
],
"background": {
"scripts": ["background.js"]
}
}
backround.js
:
chrome.experimental.processes.onExited.addListener(function(integer processId, integer exitType, integerexitCode) {
chrome.tabs.getCurrent(function(Tab tab) {
chrome.tabs.update(tab.id, {url:"http:\\127.0.0.1\""});
};)
});
Then I visited about://crash
page of Chrome. But onExited
listener does not execute.
Have I done anything wrong in manifest.json
or background.js
?