Move the deprecated
helper function to the src/display/display_utils.js
file
Given that the function is (purposely) independent of the verbosity level and that its message is worded to only apply on the main-thread, there's no reason to duplicate this across the built `pdf.js`/`pdf.worker.js` files.
This commit is contained in:
parent
4170c414fa
commit
7caf769a66
@ -16,15 +16,14 @@
|
|||||||
/* eslint no-var: error */
|
/* eslint no-var: error */
|
||||||
|
|
||||||
import {
|
import {
|
||||||
assert, createPromiseCapability, deprecated, getVerbosityLevel, info,
|
assert, createPromiseCapability, getVerbosityLevel, info, InvalidPDFException,
|
||||||
InvalidPDFException, isArrayBuffer, isSameOrigin, MissingPDFException,
|
isArrayBuffer, isSameOrigin, MissingPDFException, NativeImageDecoding,
|
||||||
NativeImageDecoding, PasswordException, setVerbosityLevel, shadow,
|
PasswordException, setVerbosityLevel, shadow, stringToBytes,
|
||||||
stringToBytes, UnexpectedResponseException, UnknownErrorException,
|
UnexpectedResponseException, UnknownErrorException, unreachable, URL, warn
|
||||||
unreachable, URL, warn
|
|
||||||
} from '../shared/util';
|
} from '../shared/util';
|
||||||
import {
|
import {
|
||||||
DOMCanvasFactory, DOMCMapReaderFactory, DummyStatTimer, loadScript,
|
deprecated, DOMCanvasFactory, DOMCMapReaderFactory, DummyStatTimer,
|
||||||
PageViewport, RenderingCancelledException, StatTimer
|
loadScript, PageViewport, RenderingCancelledException, StatTimer
|
||||||
} from './display_utils';
|
} from './display_utils';
|
||||||
import { FontFaceObject, FontLoader } from './font_loader';
|
import { FontFaceObject, FontLoader } from './font_loader';
|
||||||
import { apiCompatibilityParams } from './api_compatibility';
|
import { apiCompatibilityParams } from './api_compatibility';
|
||||||
|
@ -477,6 +477,11 @@ function loadScript(src) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Deprecated API function -- display regardless of the `verbosity` setting.
|
||||||
|
function deprecated(details) {
|
||||||
|
console.log('Deprecated API usage: ' + details);
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
PageViewport,
|
PageViewport,
|
||||||
RenderingCancelledException,
|
RenderingCancelledException,
|
||||||
@ -492,4 +497,5 @@ export {
|
|||||||
isFetchSupported,
|
isFetchSupported,
|
||||||
isValidFetchUrl,
|
isValidFetchUrl,
|
||||||
loadScript,
|
loadScript,
|
||||||
|
deprecated,
|
||||||
};
|
};
|
||||||
|
@ -307,11 +307,6 @@ function warn(msg) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated API function -- display regardless of the `verbosity` setting.
|
|
||||||
function deprecated(details) {
|
|
||||||
console.log('Deprecated API usage: ' + details);
|
|
||||||
}
|
|
||||||
|
|
||||||
function unreachable(msg) {
|
function unreachable(msg) {
|
||||||
throw new Error(msg);
|
throw new Error(msg);
|
||||||
}
|
}
|
||||||
@ -929,7 +924,6 @@ export {
|
|||||||
bytesToString,
|
bytesToString,
|
||||||
createPromiseCapability,
|
createPromiseCapability,
|
||||||
createObjectURL,
|
createObjectURL,
|
||||||
deprecated,
|
|
||||||
getVerbosityLevel,
|
getVerbosityLevel,
|
||||||
info,
|
info,
|
||||||
isArrayBuffer,
|
isArrayBuffer,
|
||||||
|
Loading…
Reference in New Issue
Block a user