I want to launch the options after my extension got installed.
Here are many answer to this issue which I tried to use in this case.

My problem is that `chrome.runtime.onInstalled` is undefined. 
This is my source code:

background.js

```
if(typeof chrome.runtime.onInstalled  !== 'undefined')
{
    chrome.runtime.onInstalled.addListener(function (details)
    {
        //if(details.reason == 'update') window.open(chrome.extension.getURL('options.html'));
        if(details.reason == 'install') window.open(chrome.extension.getURL('options.html'));
    });
}

```

my manifest.json

```
{
  "name": "Context Menu 2.0 for Google Translate™",
  "short_name": "Translate",
  "version": "1.0.0.4",
  "manifest_version": 2,
  "description": "Creates a context menu option to translate selected texts to a specified language",
  "icons": {
    "16": "trans_16.png",
    "64": "trans_64.png",
    "128": "trans_128.png"
  },
  "content_scripts": [
    {
      "matches":
      [
          "http://*/*", "https://*/*"
      ],
      "js": ["background.js"]
    }
  ], 
  "options_page": "options.html",
  "background": {
    "scripts": ["background.js"]
  },
  "permissions":[
    "http://*/*", "https://*/*",
    "storage","contextMenus"
  ]
}

```

Am I missing something in my manifest or why is the function not defined?
I had to wrap the check around it to get my add-on working at all.
Otherwise I always get an error which stops the execution of my script.