Browse Source

Load extra polyfills when isIntersecting is undefined (#4469)

pull/4/head
Yamagishi Kazutoshi 6 years ago
committed by Eugen Rochko
parent
commit
b9ec3b7e7c
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      app/javascript/mastodon/load_polyfills.js

+ 2
- 0
app/javascript/mastodon/load_polyfills.js 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
);

Loading…
Cancel
Save