-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Improve node.js support #9588
Improve node.js support #9588
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have some lint failures.
Second commit should fix that. On a side note, we all have wide screens even on laptops, so imho capping the line length to 80 chars only makes the code harder to read in most cases. But that's just a matter of personal preference of course, I use 200 on my projects and still have ample space on any display. |
src/display/canvas.js
Outdated
// typeof check is needed due to node.js support, see issue #8489 | ||
if ((typeof HTMLElement === 'function' && | ||
imgData instanceof HTMLElement) || | ||
!imgData.data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is indented with one space too many; let's re-format it like this instead:
if ((typeof HTMLElement === 'function' &&
imgData instanceof HTMLElement) || !imgData.data) {
Also, please squash the commits; refer to https://github.com/mozilla/pdf.js/wiki/Squashing-Commits.
This change fixes "Unhandled rejection ReferenceError: HTMLElement is not defined" issue that is discussed in more detail in mozilla#8489.
@Snuffleupagus The if is now formatted per spec you gave, and the commits are squashed. Thanks for the excellent squash tutorial! (https://github.com/mozilla/pdf.js/wiki/Squashing-Commits) |
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.215.176.217:8877/8992c86e9aae040/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/2f0d10986e92fac/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/2f0d10986e92fac/output.txt Total script time: 18.12 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/8992c86e9aae040/output.txt Total script time: 24.27 mins
|
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/e099d4627e41068/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/e099d4627e41068/output.txt Total script time: 2.63 mins Published |
Thank you for fixing this! |
Improve node.js support
This change fixes "Unhandled rejection ReferenceError: HTMLElement is not defined" issue that is discussed in more detail in #8489.