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

Method getIntersectionChangeEntry

src/custom-element.js:1524–1534  ·  view source on GitHub ↗

* Returns a change entry for that should be compatible with * IntersectionObserverEntry. * @return {?IntersectionObserverEntry} A change entry. * @final

()

Source from the content-addressed store, hash-verified

1522 * @final
1523 */
1524 getIntersectionChangeEntry() {
1525 const box = this.impl_
1526 ? this.impl_.getIntersectionElementLayoutBox()
1527 : this.getLayoutBox();
1528 const owner = this.getOwner();
1529 const viewport = Services.viewportForDoc(this.getAmpDoc());
1530 const viewportBox = viewport.getRect();
1531 // TODO(jridgewell, #4826): We may need to make this recursive.
1532 const ownerBox = owner && owner.getLayoutBox();
1533 return getIntersectionChangeEntry(box, ownerBox, viewportBox);
1534 }
1535
1536 /**
1537 * Returns the resource of the element.

Callers 6

layoutCallbackMethod · 0.80
renderViaIframeGet_Method · 0.80
renderMethod · 0.80
renderViaIframeGet_Method · 0.80

Calls 6

getLayoutBoxMethod · 0.95
getOwnerMethod · 0.95
getAmpDocMethod · 0.95
getRectMethod · 0.45

Tested by

no test coverage detected