2.1.0 • Published 6 months ago

@iotize/device-com-webview.js v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

IoTize Device Com Webview

IoTize communication protocol that proxy commmunication between your javascript app running inside a webview and the native application.

Installation

Browser

Download latest version to your website directory or or use the http link directly in your page.

<script src="https://cdn.jsdelivr.net/npm/@iotize/device-com-webview.js@latest/dist/iotize-device-com-webview.min.js"></script>

npm

npm install @iotize/device-com-webview.js

API

IoTizeDeviceComWebview::isIoTizeWebView()

Return true if your app script is running in a webview where the IoTize com protocol has been injected.

Usage

let result = IoTizeDeviceComWebview.isIoTizeWebView();

IoTizeDeviceComWebview::getInjectedIoTizeDevice()

Build IoTizeDevice object if it's running inside an IoTize webview. Throw an error otherwise

Usage

let iotizeDevice = IoTizeDeviceComWebview.getInjectedIoTizeDevice();
// ...

IoTizeDeviceComWebview::getInjectedIoTizeDevice()

Manually instantiate the communication protocol object.

Usage

let protocol = IoTizeDeviceComWebview.WebViewComProtocol();
// Use it to connect with an IoTizeDevice for example

For more informations, read the documentation.

2.1.0

6 months ago

2.0.1

2 years ago

2.0.0

3 years ago

1.0.0-alpha.7

4 years ago

1.0.0-alpha.5

4 years ago

1.0.0-alpha.1

4 years ago

0.0.1-alpha.7

5 years ago

0.0.1-alpha.6

5 years ago

0.0.1-alpha.5

5 years ago

0.0.1-alpha.4

5 years ago

0.0.1-alpha.3

5 years ago

0.0.1-alpha.2

5 years ago

0.0.1-alpha.1

6 years ago