I agree that you do not see in the worker thread values we set in `client.js` to `PDFJS`, but `PDFJS` itself should be visible in the worker thread? It is [assigned to here](https://github.com/peerlibrary/pdf.js/blob/peerlibrary/src/core/worker.js#L25).

Yes, `WorkerMessageHandler` has only `setup` function, so you replace it with your own. :-)

var originalWorkerMessageHandlerSetup = WorkerMessageHandler.setup;
WorkerMessageHandler.setup = function wphSetupExtended(handle) {
  originalWorkerMessageHandlerSetup(handle);

  handle.on(...);
};