diff options
author | unarist <m.unarist@gmail.com> | 2017-07-14 08:59:34 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-07-14 01:59:34 +0200 |
commit | eeb5923e89c1b9040df37db8709e3450713c6019 (patch) | |
tree | b86c9043f240d00cfd4a17cb4df1adff9c5c03ef /app/javascript/mastodon/load_polyfills.js | |
parent | a9067167bb368b1692bdd1ceea216b9215275ee2 (diff) |
Add object-fit polyfill for Edge (#4182)
Diffstat (limited to 'app/javascript/mastodon/load_polyfills.js')
-rw-r--r-- | app/javascript/mastodon/load_polyfills.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/mastodon/load_polyfills.js b/app/javascript/mastodon/load_polyfills.js index bc5468595..df7889118 100644 --- a/app/javascript/mastodon/load_polyfills.js +++ b/app/javascript/mastodon/load_polyfills.js @@ -20,11 +20,12 @@ function loadPolyfills() { ); // Latest version of Firefox and Safari do not have IntersectionObserver. - // Edge does not have requestIdleCallback. + // Edge does not have requestIdleCallback and object-fit CSS property. // This avoids shipping them all the polyfills. const needsExtraPolyfills = !( window.IntersectionObserver && - window.requestIdleCallback + window.requestIdleCallback && + 'object-fit' in (new Image()).style ); return Promise.all([ |