Constructor
new UBNativeMessage(featureopt)
Arguments:
-
[feature](String) Feature we want from plugin. Feature<->application decoding is accessible viaUBNativeMessage#featuresobject
Members
features: Object
static
Registered features.
Methods
invoke(methodName, methodParamsopt, timeoutopt) → Promise
Invoke feature method with optional params
Arguments:
-
methodName (String)
-
[methodParams] (Object)  Do not pass empty object {} here!
-
[timeout] (Number)  operation timeout. Default to UBNativeMessage#callTimeOut
extensionExists() → boolean
static
Return true if browser extension was installed
connect(timeOutopt) → Promise
Connect to native messages host. Check extension & host is installed and up to date (according to UBNativeMessage.features).
Arguments:
-
[timeOut] (Number)  Connection timeOut in millisecond. Default to UBNativeMessage.callTimeOut
disconnect() → *
Disconnect from native
invoke(methodName, methodParamsopt, timeoutopt) → Promise
Invoke feature method with optional params
Arguments:
-
methodName(String) -
[methodParams](Object) Do not pass empty object {} here! -
[timeout](Number) operation timeout. Default toUBNativeMessage#callTimeOut
extensionExists() → boolean static
Return true if browser extension was installed
connect(timeOutopt) → Promise
Connect to native messages host. Check extension & host is installed and up to date (according to UBNativeMessage.features).
Arguments:
-
[timeOut](Number) Connection timeOut in millisecond. Default to UBNativeMessage.callTimeOut
disconnect() → *
Disconnect from native