Adding basic types and concept of sharing information between worker and app. Current type (PING/PONG) will be used probably only for development, will add more concrete ones in next diffs.
Depends on D6990
Differential D6991
[web-db] implement basic app-worker connection types kamil on Mar 7 2023, 9:00 AM. Authored by Tags None Referenced Files
Details Adding basic types and concept of sharing information between worker and app. Current type (PING/PONG) will be used probably only for development, will add more concrete ones in next diffs. Depends on D6990 Run this code: const webDbWorker = new SharedWorker('/worker/webDatabase'); webDbWorker.port.onmessage = function (e) { console.log('message from worker: ', e.data); }; const message: WorkerRequestMessage = { type: workerRequestMessageTypes.PING, text: 'hi from app', }; webDbWorker.port.postMessage(message); and check results in browser, desktop and shared worker consoles. Check error flow.
Diff Detail
Event Timeline
|