tizentizen-web-apptizen-studio

How do we reference external source file in Tizen Web Widget Project?


I've created a web application, currently working on the Gear S3. I want it to convert it into a Widget. My current code was NOT built successfully first and gave error in the config file, after removing a couple of errors shown by editor (e.g. it said that no external source file should be linked in this, the files must be residing in the same directory where it is being referenced), now it's giving no error on build but when I run the code as a widget in the Emulator it's showing a popup message which says Error in Config file, there's no other information available.

In the Tizen Studio, I can see a MyProjectName.wgt directory in the main MyProjectName directory. When I check the contents of that directory it contains almost everything I have in the main project (MyProjectName directory) so when I run the code in my Emulator, It gave me error of a Chart being undefined as it was actually refrenced as an external source in the code and not added from a local direcotry.

Someone please guide me how do we run a Web Widget Project having the external source files (e.g. Chart.js and Google Map APIs etc.)


Solution

  • Web Widget is designed as simple form of application without any heavy computations etc. Because of that its functionality is limited. By design, you cannot use remote script sources. According to this you need to use local js files only. Another issue is that Web Widget does not support full ES6 standard (used in Chart.js), only a subset, which probably would cause that using Chart.js(and others) will not be possible in Web Widget.