mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Remove no-op onPull
/onCancel
streamSink callbacks from the "GetTextContent"-handler
The `MessageHandler`-implementation already handles either of these callbacks being undefined, hence there's no particular reason (as far as I can tell) to add no-op functions here. Also, in a couple of `MessageHandler`-methods, utilize an already existing local variable more.
This commit is contained in:
parent
f90f9466e3
commit
45ddb12f61
2 changed files with 2 additions and 4 deletions
|
@ -737,8 +737,6 @@ class WorkerMessageHandler {
|
|||
|
||||
handler.on("GetTextContent", function wphExtractText(data, sink) {
|
||||
const pageIndex = data.pageIndex;
|
||||
sink.onPull = function (desiredSize) {};
|
||||
sink.onCancel = function (reason) {};
|
||||
|
||||
pdfManager.getPage(pageIndex).then(function (page) {
|
||||
const task = new WorkerTask("GetTextContent: page " + pageIndex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue