1
0
Fork 0
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:
Tim van der Meij 2022-03-19 13:38:05 +01:00 committed by GitHub
commit 5de6af4e64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 32 deletions

View file

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