[api-minor] Update the minimum supported Safari version to 15.4
This patch updates the minimum supported browsers as follows: - Safari 15.4, which was released on 2022-03-15; see https://en.wikipedia.org/wiki/Safari_version_history#Safari_15 Nowadays we usually we try, where feasible and possible, to support browsers that are about two years old. The reasons for limiting support to a *somewhat* more recent Safari version include: - Throughout the history of the PDF.js project, Safari has always been the worst browser to attempt to support. Compared to other browsers there's a disproportionate number of bugs affecting Safari, especially on iOS, and in most cases those are browser-specific issues that we simply cannot address.[1] - Safari has often been a lot slower, compared to other browsers, at implementing new web-platform features. Historically this has sometimes blocked usage of new features, for the benefit of the Firefox PDF Viewer, and it's very often meant having to include and maintain polyfills *only* for Safari. - The current (minimum) supported Safari version lack enough functionality that polyfills placed in the `src/shared/compatibility.js` file are unfortunately not sufficient, but it also requires a bunch of special-cases in both the `gulpfile` and in the `web/`-code. - Given that the *built-in* Firefox PDF Viewer is the primary development target for the PDF.js library, and the general development pace these days, we need to limit the maintenance "overhead" caused by other browsers. --- [1] In a few cases a work-around might be possible, however it'd negatively affect e.g. performance, readability, and/or maintainability of the code.
This commit is contained in:
parent
2c2acdfd1c
commit
d1adab8c7b
@ -79,7 +79,7 @@ const ENV_TARGETS = [
|
||||
"last 2 versions",
|
||||
"Chrome >= 88",
|
||||
"Firefox ESR",
|
||||
"Safari >= 14.1",
|
||||
"Safari >= 15.4",
|
||||
"Node >= 18",
|
||||
"> 1%",
|
||||
"not IE > 0",
|
||||
|
@ -36,7 +36,7 @@ import { isNodeJS } from "./is_node.js";
|
||||
polyfillPath2D(globalThis);
|
||||
})();
|
||||
|
||||
// Support: Chrome<92, Safari<15.4
|
||||
// Support: Chrome<92
|
||||
(function checkArrayAt() {
|
||||
if (Array.prototype.at) {
|
||||
return;
|
||||
@ -44,7 +44,7 @@ import { isNodeJS } from "./is_node.js";
|
||||
require("core-js/es/array/at.js");
|
||||
})();
|
||||
|
||||
// Support: Chrome<92, Safari<15.4
|
||||
// Support: Chrome<92
|
||||
(function checkTypedArrayAt() {
|
||||
if (Uint8Array.prototype.at) {
|
||||
return;
|
||||
@ -52,7 +52,7 @@ import { isNodeJS } from "./is_node.js";
|
||||
require("core-js/es/typed-array/at.js");
|
||||
})();
|
||||
|
||||
// Support: Chrome<98, Safari<15.4
|
||||
// Support: Chrome<98
|
||||
(function checkStructuredClone() {
|
||||
if (globalThis.structuredClone) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user