(parentWin, childWin)
| 28 | * @param {!Window} childWin |
| 29 | */ |
| 30 | export function installForChildWin(parentWin, childWin) { |
| 31 | if (shouldLoadPolyfill(childWin)) { |
| 32 | Object.defineProperties(childWin, { |
| 33 | IntersectionObserver: {get: () => parentWin.IntersectionObserver}, |
| 34 | IntersectionObserverEntry: { |
| 35 | get: () => parentWin.IntersectionObserverEntry, |
| 36 | }, |
| 37 | }); |
| 38 | } else { |
| 39 | fixEntry(childWin); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | /** @param {!Window} win */ |
| 44 | function fixEntry(win) { |
no test coverage detected