mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
[api-minor] Re-factor the PDFScriptingManager
class to use private fields/methods
- Change (most) fields/methods into private ones, since that's now supported. - Tweak the constructor-parameters, and simplify the sandbox initialization w.r.t. the viewer components. - Remove some unused function/method parameters. - Slightly simplify the "updatefromsandbox"-handler by using local variables and inverting some conditions.
This commit is contained in:
parent
cca299eeb9
commit
547b8276e6
3 changed files with 152 additions and 177 deletions
|
@ -15,7 +15,7 @@
|
|||
|
||||
import { getPdfFilenameFromUrl, loadScript } from "pdfjs-lib";
|
||||
|
||||
async function docPropertiesLookup(pdfDocument) {
|
||||
async function docProperties(pdfDocument) {
|
||||
const url = "",
|
||||
baseUrl = url.split("#")[0];
|
||||
// eslint-disable-next-line prefer-const
|
||||
|
@ -65,4 +65,4 @@ class GenericScripting {
|
|||
}
|
||||
}
|
||||
|
||||
export { docPropertiesLookup, GenericScripting };
|
||||
export { docProperties, GenericScripting };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue