MCPcopy
hub / github.com/ampproject/amphtml / parseUrlDeprecated

Function parseUrlDeprecated

src/url.js:77–92  ·  view source on GitHub ↗
(url, opt_nocache)

Source from the content-addressed store, hash-verified

75 * @return {!Location}
76 */
77export function parseUrlDeprecated(url, opt_nocache) {
78 if (!cachedAnchorEl) {
79 cachedAnchorEl = /** @type {!HTMLAnchorElement} */ (
80 self.document.createElement('a')
81 );
82 urlCache = mode.isEsm()
83 ? null
84 : self.__AMP_URL_CACHE || (self.__AMP_URL_CACHE = new LruCache(100));
85 }
86
87 return parseUrlWithA(
88 cachedAnchorEl,
89 url,
90 mode.isEsm() || opt_nocache ? null : urlCache
91 );
92}
93
94/**
95 * Returns a Location-like object for the given URL. If it is relative,

Callers 15

buildFunction · 0.90
frame-metadata.jsFile · 0.90
validateAllowedTypesFunction · 0.90
compareParseFunction · 0.90
test-url.jsFile · 0.90
testProxyOriginFunction · 0.90
testLocalhostOriginFunction · 0.90
testOriginFunction · 0.90
searchFunction · 0.90

Calls 1

parseUrlWithAFunction · 0.70

Tested by

no test coverage detected