[Product TV] Support eden plugins 11/227411/2 accepted/tizen/unified/20200325.055717 submit/tizen/20200324.104516
authorYoungsoo Choi <kenshin.choi@samsung.com>
Mon, 9 Mar 2020 12:35:03 +0000 (05:35 -0700)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Mon, 23 Mar 2020 02:13:46 +0000 (02:13 +0000)
The webapis object is exposed to service app context
to support eden extension plugins.

Change-Id: I8586dd5c16af8c5c282742ea9647f91be6382d00
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
wrt_app/service/main.js
wrt_app/src/runtime.js

index 3ae77a6..9dfdf0f 100755 (executable)
@@ -40,6 +40,9 @@ wrt.on('start-service', (event, internal_id, permissions) => {
       require: require,
       tizen: tizen,
     };
+    if (wrt.tv) {
+      sandbox[internal_id].webapis = webapis;
+    }
     let access_control_manager = new AccessControlManager(permissions, sandbox[internal_id]);
     access_control_manager.initialize();
     for (let key in global) {
index 59923fd..eca2a84 100755 (executable)
@@ -234,6 +234,9 @@ class Runtime {
                         require: require,
                         tizen: tizen,
                     };
+                    if (wrt.tv) {
+                        _this.sandbox[app_id].webapis = webapis;
+                    }
                     for(let key in global) {
                         _this.sandbox[app_id][key] = global[key];
                     }