* Returns a change entry for that should be compatible with * IntersectionObserverEntry. * @return {?IntersectionObserverEntry} A change entry. * @final
()
| 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. |
no test coverage detected