Skip to content

Remove the eventBus parameter from getViewerConfiguration #14423

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

This structure contains almost exclusively references to DOM elements (and a couple of simple strings), rather than complete classes/functions. Hence the eventBus-option sticks out a fair bit, and I'd guess that it's mostly unused in e.g. third-party implementations.

Given that we, in multiple places, mention that the default viewer shouldn't be used as-is I really don't think that we need to keep this special eventBus-option around. Furthermore, nowadays it's also a lot easier to (safely) access the existing EventBus-instance in the viewer; see https://github.com/mozilla/pdf.js/wiki/Third-party-viewer-usage#initialization-promise which shows how to listen for the default viewer being initialized (and its eventBus thus being available).

This structure contains *almost* exclusively references to DOM elements (and a couple of simple strings), rather than complete classes/functions. Hence the `eventBus`-option sticks out a fair bit, and I'd guess that it's *mostly* unused in e.g. third-party implementations.

Given that we, in multiple places, mention that the default viewer shouldn't be used as-is I really don't think that we need to keep this special `eventBus`-option around. Furthermore, nowadays it's also a lot easier to (safely) access the existing `EventBus`-instance in the viewer; see https://github.com/mozilla/pdf.js/wiki/Third-party-viewer-usage#initialization-promise which shows how to listen for the default viewer being initialized (and its `eventBus` thus being available).
@Snuffleupagus
Copy link
Collaborator Author

/botio integrationtest

@pdfjsbot
Copy link

pdfjsbot commented Jan 6, 2022

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/d04a028bc5a8364/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jan 6, 2022

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/b82c7a51718a9ee/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jan 6, 2022

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/b82c7a51718a9ee/output.txt

Total script time: 3.75 mins

  • Integration Tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented Jan 6, 2022

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/d04a028bc5a8364/output.txt

Total script time: 6.16 mins

  • Integration Tests: Passed

@timvandermeij timvandermeij merged commit 8cf0a8c into mozilla:master Jan 8, 2022
@timvandermeij
Copy link
Contributor

Thanks!

@Snuffleupagus Snuffleupagus deleted the rm-getViewerConfiguration-eventBus branch January 8, 2022 13:21
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