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

Function ampdocServiceForInternal

src/service/index.js:32–36  ·  view source on GitHub ↗

* Returns the global instance of the `AmpDocService` service that can be * used to resolve an ampdoc for any node: either in the single-doc or * shadow-doc environment. * @param {!Window} window * @return {!./service/ampdoc-impl.AmpDocService}

(window)

Source from the content-addressed store, hash-verified

30 * @return {!./service/ampdoc-impl.AmpDocService}
31 */
32function ampdocServiceForInternal(window) {
33 return /** @type {!./service/ampdoc-impl.AmpDocService} */ (
34 getService(window, 'ampdoc')
35 );
36}
37
38/**
39 * Returns the AmpDoc for the specified context node.

Callers 1

index.jsFile · 0.85

Calls 1

getServiceFunction · 0.90

Tested by

no test coverage detected