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

Method getViewport

src/base-element.js:829–831  ·  view source on GitHub ↗

* Returns the viewport within which the element operates. * @return {!./service/viewport/viewport-interface.ViewportInterface}

()

Source from the content-addressed store, hash-verified

827 * @return {!./service/viewport/viewport-interface.ViewportInterface}
828 */
829 getViewport() {
830 return Services.viewportForDoc(this.getAmpDoc());
831 }
832
833 /**
834 * Returns the layout rectangle used for when calculating this element's

Callers 15

test-amp-img.jsFile · 0.80
maybeGenerateSizes_Method · 0.80
onViewportCallback_Method · 0.80
updateSizeMethod · 0.80
constructImplFunction · 0.80
buildImplFunction · 0.80
insertIframe_Method · 0.80
buildCallbackMethod · 0.80

Calls 1

getAmpDocMethod · 0.95

Tested by

no test coverage detected