function resolveRelativeUrl(relativeUrl) {
  // NOTE: This is the URL of the service worker, not the main HTML document.
  const baseUrl = location.href;
  return (new URL(relativeUrl, baseUrl)).href;
}
@param {string} relativeUrl A URL which may be relative to this service
  worker.
@return {string} The same URL converted to an absolute URL.