title: Get the favicon of a url and display it (firefox web-ext)
body: <p>I am working on a Firefox web-ext. Is there a way by which I can get the favicon of the current website/tab. I referred to <a href="https://jmperezperez.com/console-log-favicon/" rel="nofollow noreferrer">this</a> but I don't think the <code>%c</code> works anymore.This is my manifest.json (part of it) :</p>
  
  <pre><code>"permissions": [
    "storage",
    "&lt;all_urls&gt;",
    "tabs",
    "activeTab"
  ],
  
  "browser_action": {
    "default_icon": "icons/love.ico",
    "default_title": "Show URL and Favicon",
    "default_popup": "popup/addsite.html"
  }
  </code></pre>
  
  <p>The <code>addsite.js</code> file looks like this :</p>
  
  <pre><code>var addnewsite = document.querySelector('.addnewbutton');
  var siteContainer = document.querySelector('.site-container');
  addnewsite.addEventListener('click', addNEWsite);
  
  function onError(error) {
    console.log('Error: ${error}');
  }//generic error handler
  
  function addNEWsite(){
      siteurl();
      function siteurl(){
          browser.tabs.query({ currentWindow: true, active: true }, function (tabs) {
              addurl(tabs[0].url);
          });
      }
      function addurl(link){
          var urltostore = link;
          var gettingItem = browser.storage.local.get(urltostore);
          gettingItem.then((result) =&gt; {
              var objTest = Object.keys(result);
              if(objTest.length &lt; 1 &amp;&amp; urltostore !== ''){
                  storeurl(urltostore);
              }
          }, onError);
      }
  }
  
  function storeurl(link){
      var storingurl = browser.storage.local.set({link});
      storingurl.then(() =&gt; {
          displayurl(link);
      }, onError);
  }
  
  function displayurl(link) {
      var url = document.createElement('div');
      var urlDisplay = document.createElement('div');
      var urlPara = document.createElement('p');
      url.setAttribute('class','url');
      urlPara.textContent = link;
      urlDisplay.appendChild(urlPara);
      url.appendChild(urlDisplay);
      siteContainer.appendChild(url);
  }
  </code></pre>
  
  <p>Here is a snapshot when the button inside the extension is clicked <a href="https://i.stack.imgur.com/WdoQC.png" rel="nofollow noreferrer">(picture)</a>.You can see that I can get the url using the present code. But I also want to show the favicon of the page beside its url (favIconUrl shows the url of the icon, can i get it from there!?, if yes,how?). Can anyone help me out in doing this?</p>