removeJavaScriptHandler method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform(), WebPlatform(), WindowsPlatform()])
- required String handlerName,
Removes a JavaScript message handler previously added with the addJavaScriptHandler associated to handlerName key.
Returns the value associated with handlerName before it was removed.
Returns null if handlerName was not found.
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
@SupportedPlatforms(
platforms: [
AndroidPlatform(),
IOSPlatform(),
MacOSPlatform(),
WebPlatform(),
WindowsPlatform(),
],
)
Function? removeJavaScriptHandler({required String handlerName}) {
throw UnimplementedError(
'${PlatformInAppWebViewControllerMethod.removeJavaScriptHandler.name} is not implemented on the current platform',
);
}