(element, owner, hostViewport)
| 48 | * @return {!IntersectionObserverEntry} A change entry. |
| 49 | */ |
| 50 | export function getIntersectionChangeEntry(element, owner, hostViewport) { |
| 51 | const intersection = |
| 52 | rectIntersection(element, owner, hostViewport) || |
| 53 | layoutRectLtwh(0, 0, 0, 0); |
| 54 | const ratio = intersectionRatio(intersection, element); |
| 55 | return calculateChangeEntry(element, hostViewport, intersection, ratio); |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * A class to help amp-iframe and amp-ad nested iframe listen to intersection |
no test coverage detected