1
0
Fork 0
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:
Jonas Jenwald 2022-10-24 16:59:25 +02:00
parent 987062c302
commit bcffbf74f3
2 changed files with 11 additions and 13 deletions

View file

@ -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) {