src/url.js
/**
 * Returns absolute URL resolved based on the relative URL and the base.
 * @param {string} relativeUrlString
 * @param {string|!Location} baseUrl
 * @return {string}
 */
Returns absolute URL resolved based on the relative URL and the base.
Returns absolute URL resolved based on the relative URL and the base .
function resolveRelativeUrl(relativeUrlString, baseUrl) {
  if (typeof baseUrl == 'string') {
    baseUrl = parseUrl(baseUrl);
  }
  if (typeof URL == 'function') {
    return new URL(relativeUrlString, baseUrl.href).toString();
  }
  return resolveRelativeUrlFallback_(relativeUrlString, baseUrl);
}
function resolveRelativeUrl ( relativeUrlString , baseUrl ) { if ( typeof baseUrl == 'string' ) { baseUrl = parseUrl ( baseUrl ) ; } if ( typeof URL == 'function' ) { return new URL ( relativeUrlString , baseUrl . href ) . toString ( ) ; } return resolveRelativeUrlFallback_ ( relativeUrlString , baseUrl ) ; }
Returns absolute URL resolved based on the relative URL and the base.
Returns absolute URL resolved based on the relative URL and the base .