How to use the whatwg-url.serializeURLToUnicodeOrigin function in whatwg-url

To help you get started, we’ve selected a few whatwg-url examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bfrgoncalves / Online-PhyloViZ / node_modules / l / node_modules / jsdom / lib / jsdom.js View on Github external
exports.changeURL = function (window, urlString) {
  const doc = idlUtils.implForWrapper(window._document);

  const url = whatwgURL.parseURL(urlString);

  if (url === "failure") {
    throw new TypeError(`Could not parse "${urlString}" as a URL`);
  }

  doc._URL = url;
  doc._origin = whatwgURL.serializeURLToUnicodeOrigin(doc._URL);
};