Trivial

Local Web App

Native extended capabilities

Host app provide JS bridge to extend native APIs to webpage. All components are on window.localWebApp object. Most of the method/function are invoked asynchronously so their return results are encapsulated by Promise/A.

See Type Script definition file for API details. Following are the summary.

Native APIs

It includes following extended APIs.

Data

It also includes following extended properties.

Customized extensions

The function getCommandHandler is to get the proxy of command handler native implementation. It passes an identifier and returns an object with methods to send request and get response.

JS also can enumerate the information of all command handler by hostApp.handlers method.