Load extra polyfills when isIntersecting is undefined (#4469)

lolsob-rspec
Yamagishi Kazutoshi 2017-08-01 02:40:20 +09:00 committed by Eugen Rochko
parent 2c1fbae0b8
commit 54257c9325
1 changed files with 2 additions and 0 deletions

View File

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