Files
001code-html--cocos/scratch-vm/test/fixtures/dispatch-test-worker.js
2026-09-07 09:55:36 +08:00

12 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)}`);
});
});