Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-factor the PDFScriptingManager-class for the viewer-components #16687

Merged
merged 3 commits into from
Jul 16, 2023

Commits on Jul 16, 2023

  1. Configuration menu
    Copy the full SHA
    337cba7 View commit details
    Browse the repository at this point in the history
  2. Re-factor the PDFScriptingManager-class for the viewer-components

    Currently this class contains a few "special" code-paths for the COMPONENTS build-target, which normally wouldn't be a problem. However, in this particular case that means accessing code that we don't want to include unconditionally in all builds.
    This is currently implemented using build-time `require`-calls which we nowadays want to avoid, and we should strive to remove all such cases from the code-base. (Generally speaking `import` is the future, and build-tools may not always play well with a mix of both formats.)
    
    We can easily improve things here by using sub-classing for the COMPONENTS build-target, and then use the ability to re-name when exporting (to avoid breaking existing code).
    Snuffleupagus committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    86a8681 View commit details
    Browse the repository at this point in the history
  3. Remove the require from the web/pdfjs.js

    Having a `require` in this file has never made sense in e.g. the Firefox PDF Viewer and shouldn't really be necessary.
    Possibly the idea was to facilitate some kind of third-party bundling, however the *built* `pdf.js` file has always exposed the API-contents globally.
    Snuffleupagus committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    bad4bff View commit details
    Browse the repository at this point in the history