title: Chrome Extension's Icon on click
body: <p>I'm having a difficult time understanding how to have some JS to run when the chrome extension icon has been clicked. I'd like to for example, read some properties from the document, when the icon has been clicked.</p>
  <pre class="lang-json prettyprint-override"><code>&quot;browser_action&quot;: {
      &quot;default_icon&quot;: &quot;icon.png&quot;,
      &quot;default_popup&quot;: &quot;popup.html&quot;
  },
  &quot;permissions&quot;: [
      &quot;activeTab&quot;,
      &quot;clipboardWrite&quot;
  ]
  </code></pre>
  <p>And inside the <code>popup.html</code>, I have the following:</p>
  <pre class="lang-js prettyprint-override"><code>chrome.browserAction.onClicked.addListener(function(tab) {
      alert('working?');
  });
  </code></pre>
  <p>But, this doesn't appear to be working. I tried having the JS above inside a background script (inside <code>manifest.json</code>) but that didn't work either.</p>