title: window.getSelection returning undefined or null
body: <p>This is probably a very beginner question, but I'm about to pull my hair out because I can't figure out what I'm doing wrong. At this point, all I'm trying to do is get the selected text to print in an alert or the console (for testing). I've made sure <code>.toString()</code> method has been added to the returned Object from <code>window.getSelection().</code> No matter what I do, the console and alerts display blank. Could anyone explain why?</p>
  
  <p>I'm doing this in a local Chrome extension.</p>
  
  <p><strong>manifest.json</strong></p>
  
  <pre><code>{
      "manifest_version": 2,
      "name":"Testing",
      "version": "0.1",
      "icons": {
         "48":"48.png"
      },
  
      "background": {
          "scripts": [ "background.js" ]
      },
  
      "permissions":[ "tabs" ],
  
      "browser_action": {
          "default_icon": { "19":"img19.png" }
      }
  }
  </code></pre>
  
  <p><strong>JavaScript</strong></p>
  
  <pre><code>chrome.browserAction.onClicked.addListener(function(tab) {
      var selObj = window.getSelection();
      var selectionText = selObj.toString();
      alert(selectionText);       // displays a blank alert
      console.log(selectionText); // adds a blank line in the console
  });
  </code></pre>
  
  <p>I'm learning. Thanks in advance.</p>