onLongPressHitTestResult method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'View.setOnLongClickListener', apiUrl: 'https://developer.android.com/reference/android/view/View#setOnLongClickListener(android.view.View.OnLongClickListener)'), IOSPlatform(apiName: 'UILongPressGestureRecognizer', apiUrl: 'https://developer.apple.com/documentation/uikit/uilongpressgesturerecognizer')])
- InAppWebViewHitTestResult hitTestResult
Event fired when an HTML element of the webview has been clicked and held.
hitTestResult represents the hit result for hitting an HTML elements.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - View.setOnLongClickListener)
- iOS WKWebView (Official API - UILongPressGestureRecognizer)
Parameters - Officially Supported Platforms/Implementations:
hitTestResult: all platforms
Use the PlatformInAppBrowserEvents.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'View.setOnLongClickListener',
apiUrl:
'https://developer.android.com/reference/android/view/View#setOnLongClickListener(android.view.View.OnLongClickListener)',
),
IOSPlatform(
apiName: 'UILongPressGestureRecognizer',
apiUrl:
'https://developer.apple.com/documentation/uikit/uilongpressgesturerecognizer',
),
],
)
void onLongPressHitTestResult(InAppWebViewHitTestResult hitTestResult) {}