mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
[Firefox] Stub out the isValidFetchUrl
function in MOZCENTRAL builds
This helper function is completely unused in the Firefox PDF Viewer.
This commit is contained in:
parent
03059e1f86
commit
25a07d92d0
1 changed files with 3 additions and 0 deletions
|
@ -697,6 +697,9 @@ class StatTimer {
|
|||
}
|
||||
|
||||
function isValidFetchUrl(url, baseUrl) {
|
||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
|
||||
throw new Error("Not implemented: isValidFetchUrl");
|
||||
}
|
||||
try {
|
||||
const { protocol } = baseUrl ? new URL(url, baseUrl) : new URL(url);
|
||||
// The Fetch API only supports the http/https protocols, and not file/ftp.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue