Skip to content

Prevent run-time errors in Node.js versions with URL.createObjectURL support (issue 14170) #14171

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

Merged
merged 1 commit into from
Oct 22, 2021

Conversation

Snuffleupagus
Copy link
Collaborator

Apparently Node.js has added global URL.createObjectURL support, but not done the same thing for Blob. Hence we also need to check for the availability of Blob in the createObjectURL helper function, and it's probably a good idea to also update examples/node/pdf2svg.js to work-around this until these changes reach an official PDF.js release.

Fixes #14170

…` support (issue 14170)

Apparently Node.js has added *global* `URL.createObjectURL` support, but not done the same thing for `Blob`. Hence we also need to check for the availability of `Blob` in the `createObjectURL` helper function, and it's probably a good idea to also update `examples/node/pdf2svg.js` to work-around this until these changes reach an official PDF.js release.
@Snuffleupagus Snuffleupagus marked this pull request as ready for review October 21, 2021 08:33
@timvandermeij timvandermeij merged commit 11f030d into mozilla:master Oct 22, 2021
@timvandermeij
Copy link
Contributor

Thanks!

@Snuffleupagus Snuffleupagus deleted the issue-14170 branch October 22, 2021 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Node.js example fails on node 16.7 or later
2 participants