Remove object-fit polyfill for the old Microsoft Edge (#22693)

* chore: remove object-fit-images and its postcss packages

* chore: update postcss config

* chore: remove object-fit-image from extra_polyfills.js

* chore: remove object-fit property check from load_polyfills.js
This commit is contained in:
TAKAHASHI Shuuji 2023-01-05 21:32:02 +09:00 committed by GitHub
parent 0e7549b82d
commit d68c12648c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 143 deletions

View file

@ -23,15 +23,14 @@ function loadPolyfills() {
);
// Latest version of Firefox and Safari do not have IntersectionObserver.
// Edge does not have requestIdleCallback and object-fit CSS property.
// Edge does not have requestIdleCallback.
// This avoids shipping them all the polyfills.
const needsExtraPolyfills = !(
window.AbortController &&
window.IntersectionObserver &&
window.IntersectionObserverEntry &&
'isIntersecting' in IntersectionObserverEntry.prototype &&
window.requestIdleCallback &&
'object-fit' in (new Image()).style
window.requestIdleCallback
);
return Promise.all([