onJsAlert property

  1. @override
(Future<JsAlertResponse?> Function(InAppWebViewController controller, JsAlertRequest jsAlertRequest)?) onJsAlert
getter/setter pairoverride-getter

Event fired when javascript calls the alert() method to display an alert dialog. If JsAlertResponse.handledByClient is true, the webview will assume that the client will handle the dialog.

jsAlertRequest contains the message to be displayed in the alert dialog and the of the page requesting the dialog.

Official Android API: https://developer.android.com/reference/android/webkit/WebChromeClient#onJsAlert(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult)

Official iOS API: https://developer.apple.com/documentation/webkit/wkuidelegate/1537406-webview

Implementation

@override
Future<JsAlertResponse?> Function(
        InAppWebViewController controller, JsAlertRequest jsAlertRequest)?
    onJsAlert;