title: Use Polymer elements in Chrome extension
body: <p>At the moment I'm writing a Chrome extension and in the <code>popup.html</code> I want to use some Polymer elements, but my problem is that none of them are rendered in the popup. My <code>popup.html</code> looks like this:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
      &lt;head&gt;      
          &lt;title&gt;Getting Started Extension's Popup&lt;/title&gt;
          &lt;script src="js/popup.js"&gt;&lt;/script&gt;             
      &lt;/head&gt;
  
      &lt;body&gt;
          &lt;paper-tabs id="tabBar" class="bottom fit" selected="{{selected}}"&gt;
              &lt;paper-tab&gt;TAB 1&lt;/paper-tab&gt;
              &lt;paper-tab&gt;TAB 2&lt;/paper-tab&gt;
              &lt;paper-tab&gt;TAB 3&lt;/paper-tab&gt;
          &lt;/paper-tabs&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is my <code>popup.js</code></p>
  
  <pre><code>window.onload = function() {
      chrome.tabs.query({active: true, currentWindow: true});
  }
  </code></pre>
  
  <p>And here is my content script:</p>
  
  <pre><code>function loadRes(res) {
      return new Promise( function(resolve, reject) {
          var link = document.createElement('link');
  
          link.setAttribute('rel', 'import');
          link.setAttribute('href', res);
  
          link.onload = function() {
              resolve(res);
          };
  
          document.head.appendChild(link);
      });
  }
  
  chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) {
  
      loadRes(chrome.extension.getURL("polymer/webcomponentsjs/webcomponents-lite.js"))
      .then(loadRes(chrome.extension.getURL("polymer/paper-tabs/paper-tabs.html")))
  
  });
  </code></pre>
  
  <p>This code comes from <a href="https://stackoverflow.com/a/30034988/2047987">this answer</a> and it should work, so do you have any ideas what is wrong with my code or have I misunderstood something? I thought that the code from <code>popup.js</code> is executed when the popup is loading and and referenced polymer files are injected into the <code>popup.html</code> file. Isn't that right? I also added all polymer files to <code>web_accessible_resources</code> and my <code>content_scripts</code> runs at <code>document_start</code>.</p>