When the app launched again, onRequest() event will
be called to handle different appcontrol data.
Reference:
https://review.tizen.org/gerrit/#/c/platform/framework/web/wrtjs/+/257913/
Change-Id: I255d9882f79196b60f77f3504a7d012963f60c1c
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
});
function createWorker(id: string, startService: string, filename: string) {
- if (workers[id])
+ if (workers[id]) {
+ workers[id].postMessage({ type: 'wake' });
return;
+ }
workers[id] = new Worker(startService, {
workerData: {
return;
parentPort.on('message', (message) => {
console.log(`Received message type : ${message.type}`);
- if (message.type === 'stop') {
+ if (message.type === 'wake') {
+ app?.onRequest();
+ } else if (message.type === 'stop') {
stop(id);
setTimeout(() => {
XWalkExtension.cleanup();