Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Location.prototype.replace = function (url) {
// This is nowhere near spec compliant, but has worked so far.
whatwgURL.setTheInput(this, url);
};
function Location(urlString, relevantDocument) {
this[document] = relevantDocument;
whatwgURL.setTheInput(this, urlString);
try {
this[oldParsedURL] = new URL(urlString);
} catch (e) {
this[oldParsedURL] = {};
}
}
_applyState(state) {
whatwgURL.setTheInput(this._location, resolveHref(this._location.href, state.url));
},