@param {!Window} win
(win)
| 42 | |
| 43 | /** @param {!Window} win */ |
| 44 | function fixEntry(win) { |
| 45 | // Minimal polyfill for Edge 15's lack of `isIntersecting` |
| 46 | // See: https://github.com/w3c/IntersectionObserver/issues/211 |
| 47 | if ( |
| 48 | win.IntersectionObserverEntry && |
| 49 | !('isIntersecting' in win.IntersectionObserverEntry.prototype) |
| 50 | ) { |
| 51 | Object.defineProperty( |
| 52 | win.IntersectionObserverEntry.prototype, |
| 53 | 'isIntersecting', |
| 54 | { |
| 55 | enumerable: true, |
| 56 | configurable: true, |
| 57 | get() { |
| 58 | return this.intersectionRatio > 0; |
| 59 | }, |
| 60 | } |
| 61 | ); |
| 62 | } |
| 63 | } |
no outgoing calls
no test coverage detected