mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Remove the PdfManager.onLoadedStream
method (PR 15616 follow-up)
After the clean-up in PR 15616, the `PdfManager.onLoadedStream` method now only has a single call-site. Hence why this patch suggests that we remove this method and replace it with an *optional* parameter in `PdfManager.requestLoadedStream` instead. By making the new behaviour opt-in, we'll thus not change any existing call-site.
This commit is contained in:
parent
5b46400240
commit
caef47a0cf
3 changed files with 10 additions and 24 deletions
|
@ -420,7 +420,7 @@ class WorkerMessageHandler {
|
|||
}
|
||||
pdfManager = newPdfManager;
|
||||
|
||||
pdfManager.onLoadedStream().then(function (stream) {
|
||||
pdfManager.requestLoadedStream(/* noFetch = */ true).then(stream => {
|
||||
handler.send("DataLoaded", { length: stream.bytes.byteLength });
|
||||
});
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue