mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
b4c0cfe940
Central dispatch and worker dispatch share most of their code now by inheriting from a new shared dispatch class. Also, the format of passed messages has been altered to make it easier to understand in a debugger.
11 lines
430 B
JavaScript
11 lines
430 B
JavaScript
const dispatch = require('../../src/dispatch/worker-dispatch');
|
|
const DispatchTestService = require('./dispatch-test-service');
|
|
const log = require('../../src/util/log');
|
|
|
|
dispatch.setService('RemoteDispatchTest', new DispatchTestService());
|
|
|
|
dispatch.waitForConnection.then(() => {
|
|
dispatch.call('test', 'onWorkerReady').catch(e => {
|
|
log(`Test worker failed to call onWorkerReady: ${JSON.stringify(e)}`);
|
|
});
|
|
});
|