Merge pull request #13158 from Snuffleupagus/rm-URL-polyfill
Remove the `URL` polyfill
This commit is contained in:
commit
2fb4d02ea5
@ -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…
x
Reference in New Issue
Block a user