You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varmsie=/(msie|trident)/i.test(navigator.userAgent);varurlParsingNode=document.createElement('a');varoriginURL;/** * Parse a URL to discover it's components * * @param {String} url The URL to be parsed * @returns {Object} */functionresolveURL(url){varhref=url;if(msie){// IE needs attribute set twice to normalize propertiesurlParsingNode.setAttribute('href',href);href=urlParsingNode.href;}urlParsingNode.setAttribute('href',href);// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutilsreturn{href: urlParsingNode.href,protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/,'') : '',host: urlParsingNode.host,search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/,'') : '',hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/,'') : '',hostname: urlParsingNode.hostname,port: urlParsingNode.port,pathname: urlParsingNode.pathname.charAt(0)==='/' ? urlParsingNode.pathname : '/'+urlParsingNode.pathname};}originURL=resolveURL(window.location.href);/** * Determine if a URL shares the same origin as the current location * * @param {String} requestURL The URL to test * @returns {boolean} True if URL shares the same origin, otherwise false */returnfunction(requestURL){varparsed=utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;returnparsed.protocol===originURL.protocol&&parsed.host===originURL.host;};
这里 axios 使用了 a 标签的 element.pathname 来替代 new URL().pathname
Kraken 需要给 a 标签支持 pathname 属性
The text was updated successfully, but these errors were encountered:
isURLSameOrigin
这里 axios 使用了
a
标签的element.pathname
来替代new URL().pathname
The text was updated successfully, but these errors were encountered: