MCPcopy Create free account
hub / github.com/ampproject/amphtml / constructor

Method constructor

src/service/url-impl.js:26–35  ·  view source on GitHub ↗

* @param {!./ampdoc-impl.AmpDoc} ampdoc

(ampdoc)

Source from the content-addressed store, hash-verified

24 * @param {!./ampdoc-impl.AmpDoc} ampdoc
25 */
26 constructor(ampdoc) {
27 const root = ampdoc.getRootNode();
28 const doc = root.ownerDocument || root;
29
30 /** @private @const {!HTMLAnchorElement} */
31 this.anchor_ = /** @type {!HTMLAnchorElement} */ (doc.createElement('a'));
32
33 /** @private @const {?LruCache} */
34 this.cache_ = mode.isEsm() ? null : new LruCache(100);
35 }
36
37 /**
38 * Parses the URL in the context of the current document.

Callers

nothing calls this directly

Calls 1

getRootNodeMethod · 0.45

Tested by

no test coverage detected