How to use the whatwg-url-compat.setTheInput function in whatwg-url-compat

To help you get started, we’ve selected a few whatwg-url-compat 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 jsdom / jsdom / lib / jsdom / browser / location.js View on Github external
Location.prototype.replace = function (url) {
  // This is nowhere near spec compliant, but has worked so far.
  whatwgURL.setTheInput(this, url);
};
github jsdom / jsdom / lib / jsdom / browser / location.js View on Github external
function Location(urlString, relevantDocument) {
  this[document] = relevantDocument;
  whatwgURL.setTheInput(this, urlString);

  try {
    this[oldParsedURL] = new URL(urlString);
  } catch (e) {
    this[oldParsedURL] = {};
  }
}
github jsdom / jsdom / lib / jsdom / browser / history.js View on Github external
_applyState(state) {
    whatwgURL.setTheInput(this._location, resolveHref(this._location.href, state.url));
  },

whatwg-url-compat

An implementation of the WHATWG URL algorithm

MIT
Latest version published 9 years ago

Package Health Score

63 / 100
Full package analysis

Similar packages