hasJavaScriptHandler method
- required String handlerName,
Returns true if a JavaScript handler with handlerName already exists, otherwise false.
Officially Supported Platforms/Implementations:
- Android WebView
- iOS WKWebView
- macOS WKWebView
- Web <iframe> but requires same origin
- Windows WebView2
Parameters - Officially Supported Platforms/Implementations:
handlerName: all platforms
Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.
Implementation
bool hasJavaScriptHandler({required String handlerName}) =>
platform.hasJavaScriptHandler(handlerName: handlerName);