closure/goog/dom/uri.js
function normalizeUri(uri) {
  const anchor = createElement(TagName.A);
  // This is safe even though the URL might be untrustworthy.
  // The SafeURL is only used to set the href of an HTMLAnchorElement
  // that is never added to the DOM. Therefore, the user cannot navigate
  // to this URL.
  const safeUrl =
      uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(
          Const.from('This URL is never added to the DOM'), uri);
  setAnchorHref(anchor, safeUrl);
  return anchor.href;
}
function normalizeUri(uri) {
  const anchor = createElement(TagName.A);
  // This is safe even though the URL might be untrustworthy.
  // The SafeURL is only used to set the href of an HTMLAnchorElement
  // that is never added to the DOM. Therefore, the user cannot navigate
  // to this URL.
  const safeUrl =
      uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(
          Const.from('This URL is never added to the DOM'), uri);
  setAnchorHref(anchor, safeUrl);
  return anchor.href;
}
function normalizeUri ( uri ) { const anchor = createElement ( TagName . A ) ; // This is safe even though the URL might be untrustworthy. // The SafeURL is only used to set the href of an HTMLAnchorElement // that is never added to the DOM. Therefore, the user cannot navigate // to this URL. const safeUrl = uncheckedconversions . safeUrlFromStringKnownToSatisfyTypeContract ( Const . from ( 'This URL is never added to the DOM' ) , uri ) ; setAnchorHref ( anchor , safeUrl ) ; return anchor . href ; }
Normalizes a URL by assigning it to an anchor element and reading back href.

This converts relative URLs to absolute, and cleans up whitespace.
@param {string} uri A string containing a URI.
@return {string} Normalized, absolute form of uri.
Normalizes a URL by assigning it to an anchor element and reading back href .