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

Method getAmpDoc

src/custom-element.js:317–320  ·  view source on GitHub ↗

* Returns the associated ampdoc. Only available after attachment. It throws * exception before the element is attached. * @return {!./service/ampdoc-impl.AmpDoc} * @final * @package

()

Source from the content-addressed store, hash-verified

315 * @package
316 */
317 getAmpDoc() {
318 devAssert(this.ampdoc_, 'no ampdoc yet, since element is not attached');
319 return /** @type {!./service/ampdoc-impl.AmpDoc} */ (this.ampdoc_);
320 }
321
322 /**
323 * Returns Resources manager. Only available after attachment. It throws

Callers 13

buildMethod · 0.95
mountMethod · 0.95
unmountMethod · 0.95
preconnectMethod · 0.95
upgradeOrSchedule_Method · 0.95
toggleFallbackMethod · 0.95
toggleLoadingMethod · 0.95
overflowCallbackMethod · 0.95
mutateOrInvoke_Method · 0.95

Calls 1

devAssertFunction · 0.90

Tested by

no test coverage detected