title: Firefox extension: how to get document of currently opened tab from popup.js?
body: <p>I have tried:</p>
  
  <pre><code>browser.tabs.query({ active: true, currentWindow: true }, callback)  // can't get extract document from tab
  browser.windows.getCurrent()  // can't get document from window
  content.document  // document of popup
  </code></pre>
  
  <p>I need document to get selected text on currently opened site.</p>