function toAbsoluteURL(url) {
    const a = document.createElement('a');
    a.setAttribute('href', url); // <a href="hoge.html">
    return a.cloneNode(false).href; // -> "http://example.com/hoge.html"
  }
Polyfills taken from https://github.com/uupaa/dynamic-import-polyfill.

Copied here because:
- It is not available on NPM
- We need it to be a plain script which registers to the window