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

Method renderOutsideViewport

src/base-element.js:515–518  ·  view source on GitHub ↗

* Subclasses can override this method to opt-out of rendering the element * when it is not currently visible. * Returning a boolean allows or prevents rendering outside the viewport at * any distance, while returning a positive number allows rendering only when * the element is within X

()

Source from the content-addressed store, hash-verified

513 * @return {boolean|number}
514 */
515 renderOutsideViewport() {
516 // Inabox allow layout independent of viewport location.
517 return getMode(this.win).runtime == 'inabox' || 3;
518 }
519
520 /**
521 * Allows for rendering outside of the constraint set by renderOutsideViewport

Callers 2

test-resource.jsFile · 0.45

Calls 1

getModeFunction · 0.90

Tested by

no test coverage detected