Communication between background.js and content-script? Response is UNDEFINED
<p>From content-script:</p>

<pre><code>chrome.runtime.sendMessage({ type: "getFormatOption" }, function (response) {
    return response === 'csv';
});
</code></pre>

<p>I have inspected in console: the value, which is used in SendResponse() from background.js method is OK. The problem is that response is always UNDEFINED. What am I doing wrong?</p>

<p>background.js:</p>

<pre><code>chrome.runtime.onMessage.addListener(
    function (message, sender, sendResponse) {
        switch (message.type) {
            case 'getFormatOption':
                var response = $('input[name=csvOrEnter_radio]:checked', '#csvOrEnter_form').val();
                console.log('formatOption: ' + response);
                sendResponse(response);
                break;
            case 'getFilteringStrategy':
                var response = $('input[name=filteringStrategy_radio]:checked', '#filteringStrategy_form').val();
                console.log('filteringStrategy: ' + response);
                sendResponse(response);
                break;
            default:
                console.error('Unrecognised message: ', message);
        }
    }
);
</code></pre>

<p>The idea that I take some values from radiobuttons from my plugin popup.html.</p>

<p>Manifest:</p>

<pre><code>   {
  // default for the latest version of Chrome extensions
  "manifest_version": 2,

  // extension related general info
  "name": "FB Interest Search Tool",
  "short_name": "FB Interest Search Tool",
  "description": "FB Interest Search Tool",
  "version": "1.0.0",

  "default_locale": "en",

  // sets path to popup files
  "browser_action": {
    "default_icon": "img/128.png",
    "default_popup": "popups/popup.html",
    "default_title": "FB Interest Search Tool"
  },

  // sets path to content scripts and when they are injected onto the page
  "content_scripts": [
    {
      "matches": [ "http://*/*", "https://*/*" ],
      "css": [ "styles/styles.css" ],
      "js": [
        "bower_components/jquery.min.js",
        "bower_components/jquery.cookie.js"
      ]
    }
  ],

  // sets path to background scripts
  "background": {
    "scripts": [
      "bower_components/jquery.min.js",
      "bower_components/jquery.cookie.js",
      "bg/background.js",
      "content-scripts/rewriteStorage.js"
    ]
  },

  "permissions": [
    "activeTab",
    "http://*/",
    "https://*/",
    "file:///*/*",
    "&lt;all_urls&gt;",
    "tabs",
    "storage",
    "unlimitedStorage",
    "storage",
    "cookies"
  ],

  "web_accessible_resources": [ "styles/commentblocker_on.css" ]
}
</code></pre>