title: Notification API permission being reset
body: <p>I am trying to make a chatroom and have everything up and running, but am getting stuck when it comes to desktop notifications. Whenever I request permission for notifications and get the access set to 'granted', the permission will reset to 'default' not allowing notifications to be displayed. Is there a way to get the permission to stay set as 'granted' or would I have to get them to keep allowing notifications every time a new message is sent? Is it a protection involved with running it as a local file (on ChromeOS)? Here is the code for the part about notifications:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function showNotification() {
    var title = "New Message!";
    var messageValueNotif = document.querySelectorAll(".message");
    if (messageValueNotif.length !== 0) {
      messageValueNotif = messageValueNotif[messageValueNotif.length - 1].innerHTML;
    } else {
      return false;
    }
    var currentFavicon = document.querySelector('link').href;
    var notif = new Notification(title, {
      body: messageValueNotif,
      icon: currentFavicon
    });
    notif.onclick = () =&gt; {
      notif.close();
      window.parent.focus();
    }
  }
  
  function requestAndShowPermission() {
    if (Notification.permission === 'granted') {
      showNotification();
    } else if (Notification.permission !== 'denied') {
      Notification.requestPermission().then(function(permission) {
        showNotification()
      });
    }
  }
  
  window.onload = requestAndShowPermission();</code></pre>
  </div>
  </div>
  </p>