title: onMessage not getting called in content script for chrome extension
body: <p>i am trying my hands at developing chrome extensions. i am trying to send a message to a content script from the background script. i have tried the following code:</p>
  
  <p>manifest</p>
  
  <pre><code>{
      ....
      "background": {
          "scripts": ["background.js"]
      },
      "content_scripts": [
          {
              "matches": ["http://myurl.com", "http://myurl.com"],
              "js": ["content.js"],
              "run_at": "document_end"
          }
      ]
  ....
  }
  </code></pre>
  
  <p>background script:</p>
  
  <pre><code>chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
    console.log("inside");
    chrome.tabs.sendMessage(tabs[0].id, {greeting: "hello"}, function(response) {
      console.log("Response");
    });
  });
  </code></pre>
  
  <p>content script:</p>
  
  <pre><code>chrome.runtime.onMessage.addListener(
    function(request, sender, sendResponse) {
      console.log("From Background Script: " + console.greeting);
      return true;
    });
  </code></pre>
  
  <p>i checked the console. the "inside" and "Response" are getting logged, but not the "From Background Script..."</p>
  
  <p>what can be the problem?</p>