1
0
Fork 0
forked from fedi/mastodon

Load extra polyfills when isIntersecting is undefined (#4469)

This commit is contained in:
Yamagishi Kazutoshi 2017-08-01 02:40:20 +09:00 committed by Eugen Rochko
parent 9b247c3d88
commit b9ec3b7e7c

View file

@ -24,6 +24,8 @@ function loadPolyfills() {
// This avoids shipping them all the polyfills. // This avoids shipping them all the polyfills.
const needsExtraPolyfills = !( const needsExtraPolyfills = !(
window.IntersectionObserver && window.IntersectionObserver &&
window.IntersectionObserverEntry &&
'isIntersecting' in IntersectionObserverEntry.prototype &&
window.requestIdleCallback && window.requestIdleCallback &&
'object-fit' in (new Image()).style 'object-fit' in (new Image()).style
); );