docs: function isSameOrigin(url) {
      let location = window.location;
      let a = document.createElement('a');
  
      a.href = url;
  
      return a.hostname == location.hostname &&
          a.port == location.port &&
          a.protocol == location.protocol;
  }