intersection-observer
Advanced tools
Comparing version 0.3.4 to 0.4.0
@@ -25,3 +25,14 @@ /** | ||
'IntersectionObserverEntry' in window && | ||
'intersectionRatio' in window.IntersectionObserverEntry.prototype) { | ||
'intersectionRatio' in IntersectionObserverEntry.prototype) { | ||
// Minimal polyfill for Edge 15's lack of `isIntersecting` | ||
// See: https://github.com/WICG/IntersectionObserver/issues/211 | ||
if (!('isIntersecting' in IntersectionObserverEntry.prototype)) { | ||
Object.defineProperty(IntersectionObserverEntry.prototype, | ||
'isIntersecting', { | ||
get: function () { | ||
return this.intersectionRatio > 0; | ||
} | ||
}); | ||
} | ||
return; | ||
@@ -28,0 +39,0 @@ } |
{ | ||
"name": "intersection-observer", | ||
"version": "0.3.4", | ||
"version": "0.4.0", | ||
"description": "A polyfill for IntersectionObserver", | ||
@@ -5,0 +5,0 @@ "main": "intersection-observer", |
67491
1536