Skip to content

[api-minor] Remove the separate enableScripting option in BaseViewer #13816

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

Conversation

Snuffleupagus
Copy link
Collaborator

Prior to PR #13042, when scripting wasn't really possible to use outside of the full viewer, the enableScripting option made sense.
However, at this point in time having to both pass in a PDFScriptingManager-instance and set the enableScripting-boolean when creating a BaseViewer-instance feels redundant and (mostly) annoying. Hence this patch, which removes the separate boolean and always enables scripting when scriptingManager is provided.

The relevant "viewer component" examples are also updated (with a comment), but in such a way that scripting support won't just break when used with the current PDF.js releases.

Prior to PR 13042, when scripting wasn't really possible to use outside of the full viewer, the `enableScripting` option made sense.
However, at this point in time having to both pass in a `PDFScriptingManager`-instance *and* set the `enableScripting`-boolean when creating a `BaseViewer`-instance feels redundant and (mostly) annoying. Hence this patch, which removes the *separate* boolean and always enables scripting when `scriptingManager` is provided.

The relevant "viewer component" examples are also updated (with a comment), but in such a way that scripting support won't just break when used with the current PDF.js releases.
@Snuffleupagus
Copy link
Collaborator Author

/botio integrationtest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/cf1f4a0d6dedbe2/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://3.101.106.178:8877/2180d7f879ab28c/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/cf1f4a0d6dedbe2/output.txt

Total script time: 4.39 mins

  • Integration Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://3.101.106.178:8877/2180d7f879ab28c/output.txt

Total script time: 6.40 mins

  • Integration Tests: Passed

@timvandermeij timvandermeij merged commit 314a136 into mozilla:master Jul 30, 2021
@timvandermeij
Copy link
Contributor

This does seem simpler to me too; thanks!

@Snuffleupagus Snuffleupagus deleted the rm-BaseViewer-enableScripting-option branch July 30, 2021 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants