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

Method isInViewport

src/service/resource.js:970–975  ·  view source on GitHub ↗

* Whether the resource is currently visible in the viewport. * @return {boolean}

()

Source from the content-addressed store, hash-verified

968 * @return {boolean}
969 */
970 isInViewport() {
971 if (this.isInViewport_) {
972 this.resolveDeferredsWhenWithinViewports_();
973 }
974 return this.isInViewport_;
975 }
976
977 /**
978 * Updates the inViewport state of the element.

Callers 2

test-resource.jsFile · 0.80
isLayoutAllowed_Method · 0.80

Tested by

no test coverage detected