getWebBridgeScript static method
String
getWebBridgeScript({
- HackleWebViewConfig webViewConfig = HackleWebViewConfig.defaultConfig,
- bool messageChannel = false,
JS Bridge Script for Hackle SDK
webViewConfig - WebView specific configuration.
messageChannel - Whether the script advertises the asynchronous message
channel in getSupportedInvocationTypes. Disabled by default. When
enabled, register webViewMessageHandler on the WebView under
webViewMessageHandlerName; otherwise commands sent through the message
channel are never handled.
Implementation
static String getWebBridgeScript(
{HackleWebViewConfig webViewConfig = HackleWebViewConfig.defaultConfig,
bool messageChannel = false}) {
return HackleWebBridge.instance.bridgeScript(
sdkKey: _sdkKey,
appMode: _appMode,
webViewConfig: webViewConfig,
messageChannel: messageChannel);
}