From: Youngsoo Choi Date: Mon, 19 Oct 2020 12:11:03 +0000 (-0700) Subject: [Service] Make appInfo writable X-Git-Tag: accepted/tizen/unified/20201029.124952~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=25de0d7b52383ecec883b6b88be004d269edf2ed;p=platform%2Fframework%2Fweb%2Fwrtjs.git [Service] Make appInfo writable In follwing sample code, The appInfo needs to be writable with application information having app id 'TCT_APPCONTROL_APPID' as TC expected. > var app = tizen.application.getCurrentApplication(); > app.appInfo = > tizen.application.getAppInfo(application_common.TCT_APPCONTROL_APPID); Change-Id: I6d89d5d1c0d9c241cebc5ff92b15167c890f1a55 Signed-off-by: Youngsoo Choi --- diff --git a/wrt_app/service/device_api_router.ts b/wrt_app/service/device_api_router.ts index 4ccf2ef..546c3a4 100644 --- a/wrt_app/service/device_api_router.ts +++ b/wrt_app/service/device_api_router.ts @@ -149,7 +149,7 @@ export class DeviceAPIRouter { version: { writable: false, enumerable: true } }); Object.defineProperties(this.currentApplication, { - appInfo: { writable: false, enumerable: true }, + appInfo: { enumerable: true }, contextId: { writable: false, enumerable: true } }); // tizen.application.getCurrentApplication().getRequestedAppControl() @@ -168,7 +168,7 @@ export class DeviceAPIRouter { let app_id = args[0]; if (this.hasNoneOrNull(args)) app_id = this.getServiceId(); - console.log(`Routing - getAppInfo()`); + console.log(`Routing - getAppInfo(${app_id})`); return this.funcGetAppInfo(app_id); } // tizen.application.getAppCerts()