Add object-fit polyfill for Edge (#4182)
This commit is contained in:
parent
a9067167bb
commit
eeb5923e89
5 changed files with 74 additions and 3 deletions
|
@ -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([
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue