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

Method getInitialLayoutBox

src/service/resource.js:622–626  ·  view source on GitHub ↗

* Returns the first measured layout box. * @return {!../layout-rect.LayoutRectDef}

()

Source from the content-addressed store, hash-verified

620 * @return {!../layout-rect.LayoutRectDef}
621 */
622 getInitialLayoutBox() {
623 // Before the first measure, there will be no initial layoutBox.
624 // Luckily, layoutBox will be present but essentially useless.
625 return this.initialLayoutBox_ || this.layoutBox_;
626 }
627
628 /**
629 * Whether the resource is displayed, i.e. if it has non-zero width and

Callers 2

test-resource.jsFile · 0.80
elementNearBottom_Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected