mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #13158 from Snuffleupagus/rm-URL-polyfill
Remove the `URL` polyfill
This commit is contained in:
commit
2fb4d02ea5
1 changed files with 0 additions and 18 deletions
|
@ -74,24 +74,6 @@ if (
|
|||
globalThis.Promise = require("core-js/es/promise/index.js");
|
||||
})();
|
||||
|
||||
// Support: Safari
|
||||
(function checkURL() {
|
||||
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("PRODUCTION")) {
|
||||
// Prevent "require is not a function" errors in development mode,
|
||||
// since the `URL` constructor should be available in modern browers.
|
||||
return;
|
||||
} else if (!PDFJSDev.test("GENERIC")) {
|
||||
// The `URL` constructor is assumed to be available in the extension
|
||||
// builds.
|
||||
return;
|
||||
} else if (PDFJSDev.test("IMAGE_DECODERS")) {
|
||||
// The current image decoders don't use the `URL` constructor, so it
|
||||
// doesn't need to be polyfilled for the IMAGE_DECODERS build target.
|
||||
return;
|
||||
}
|
||||
globalThis.URL = require("core-js/web/url.js");
|
||||
})();
|
||||
|
||||
// Support: Safari<10.1, Node.js
|
||||
(function checkReadableStream() {
|
||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("IMAGE_DECODERS")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue