Calling JS Services

In this page, you can learn how to call JS services from another JS services in webOS IoT.

To call a JS service from another JS service, you must load the webos-service module first. After that, you can make webOS service calls using the method.

Below is an example of how a webOS service can be called using the webos-service module.

var Service = require('webos-service');
var service = new Service("com.mycom.helloworld");

service.register("hello", function(message) {"luna://com.webos.service.connectionmanager/getstatus", {}, function(response) {
        if(response.payload.isInternetConnectionAvailable == true) {
            // ...
                "returnValue": true

For more details about the webos-service module, see webos-service Library API Reference.