mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Let the PdfManager.requestLoadedStream
method return the stream
*This is very old code, and it could thus do with some simplification.* Note how in the `src/core/worker.js` file we're combining both the `PdfManager.requestLoadedStream` and `PdfManager.onLoadedStream` methods in order to access the stream-data. This seems unnecessary, and it's simple enough to always let the `PdfManager.requestLoadedStream` method return the stream-data as well.
This commit is contained in:
parent
987062c302
commit
bcffbf74f3
2 changed files with 11 additions and 13 deletions
|
@ -156,7 +156,9 @@ class LocalPdfManager extends BasePdfManager {
|
|||
return Promise.resolve();
|
||||
}
|
||||
|
||||
requestLoadedStream() {}
|
||||
requestLoadedStream() {
|
||||
return this._loadedStreamPromise;
|
||||
}
|
||||
|
||||
onLoadedStream() {
|
||||
return this._loadedStreamPromise;
|
||||
|
@ -213,7 +215,7 @@ class NetworkPdfManager extends BasePdfManager {
|
|||
}
|
||||
|
||||
requestLoadedStream() {
|
||||
this.streamManager.requestAllChunks();
|
||||
return this.streamManager.requestAllChunks();
|
||||
}
|
||||
|
||||
sendProgressiveData(chunk) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue