mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Replace the bundled ReadableStream
polyfill with the web-streams-polyfill
npm package (issue 11157)
Compared to the recently replaced `URL` polyfill, the new `ReadableStream` polyfill isn't being exported globally for two reasons: - We're currently checking for the existence of a global `ReadableStream` implementation when determining if the Fetch API will be used; please see `isFetchSupported` in the src/display/display_utils.js file. - Given that it's much newer functionality (compared to `URL`) and that not all browsers may implement all parts of the specification yet, not exposing the `ReadableStream` globally seems safer for now.
This commit is contained in:
parent
9596d702a9
commit
0ee373f9cc
10 changed files with 15 additions and 4014 deletions
|
@ -50,6 +50,6 @@ if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('MOZCENTRAL')) {
|
|||
exports.ReadableStream = DummyReadableStream;
|
||||
} else {
|
||||
exports.ReadableStream =
|
||||
require('../../external/streams/streams-lib').ReadableStream;
|
||||
require('web-streams-polyfill/dist/ponyfill').ReadableStream;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue