title: Storing Firefox extension preference using storage, data is not stored
body: <p>I am building a Firefox extension where I need to store some preferences and from what I can tell, it is recommended to use the storage API for that. 
  However, I have the problem that the data is not stored or at least I cannot get it back out from storage.</p>
  
  <p>I have added <code>"permissions": ["storage"]</code> to my manifest.json file and this is my options.html site: </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
    &lt;/head&gt;
  
  &lt;body&gt;
    &lt;p&gt;Current redirect site &lt;b id="current-redirect-site"&gt;www.duckduckgo.com&lt;/b&gt;&lt;/p&gt;
    &lt;form&gt;
        &lt;label&gt;New redirect site&lt;/label&gt;
        &lt;input type="text" id="new-redirect-site" &gt;
        &lt;button type="submit"&gt;Save&lt;/button&gt;
    &lt;/form&gt;
    &lt;script src="options.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>And the options.js file: </p>
  
  <pre class="lang-js prettyprint-override"><code>function saveOptions(e) {
      browser.storage.sync.set({
          site_pause_redirect_site: document.querySelector("#new-redirect-site").value
      });
      e.preventDefault();
  }
  
  function restoreOptions() {
    var storageItem = browser.storage.managed.get('site_pause_redirect_site');
    storageItem.then((res) =&gt; {
      document.querySelector("#current-redirect-site").innerText = res.colour;
    });
  
    var gettingItem = browser.storage.sync.get('site_pause_redirect_site');
    gettingItem.then((res) =&gt; {
      document.querySelector("#current-redirect-site").value = res.site_pause_redirect_site;
    });
  }
  
  document.addEventListener('DOMContentLoaded', restoreOptions);
  document.querySelector("form").addEventListener("submit", saveOptions);
  </code></pre>
  
  <p>Things I have noticed: </p>
  
  <ol>
  <li>In the permission pane for the addon when testing, I cannot see the storage permission</li>
  <li>I tried adding a console.log to the <code>saveOptions</code> function and that was not executed, I don't know if the extension allows for this though. </li>
  </ol>
  
  <p>Any ideas? Have I made an obvious mistake I just have overlooked? </p>