In this page, you can learn how to call JS services from web apps or another JS services in webOS Open Source Edition (OSE).
Calling JS Services from Web Apps
Import the webOS Library
To call a JS service from a web app, the webOS library is required.
Note If you create a web app using the “basic” template of the Command-Line Interface (CLI) tool, the web app will already contain the webOS library in its webOSjs-0.1.0 directory and have the library included in the index.html file. In this case, you don’t need to add additional code to import the library, so you can safely skip this step.
To include the library in a web app, follow the steps below:
Download the webOS library file from webOSjs-0.1.0.zip and decompress it to the project root directory. The following directory will be created:
In the index.html file, include the webOS library with the following code.