mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Merge pull request #14683 from Snuffleupagus/sendTest-cleanup
[src/display/api.js] Simplify the `sendTest` function, used with Worker initialization (PR 14291 follow-up)
This commit is contained in:
commit
5de6af4e64
2 changed files with 18 additions and 32 deletions
|
@ -75,9 +75,8 @@ class WorkerMessageHandler {
|
|||
}
|
||||
testMessageProcessed = true;
|
||||
|
||||
// Ensure that `TypedArray`s can be sent to the worker,
|
||||
// and that `postMessage` transfers are supported.
|
||||
handler.send("test", data instanceof Uint8Array && data[0] === 255);
|
||||
// Ensure that `TypedArray`s can be sent to the worker.
|
||||
handler.send("test", data instanceof Uint8Array);
|
||||
});
|
||||
|
||||
handler.on("configure", function wphConfigure(data) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue