onJsAlert method

Future<JsAlertResponse?>? onJsAlert(
  1. JsAlertRequest jsAlertRequest
)
inherited

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

Future<JsAlertResponse?>? onJsAlert(JsAlertRequest jsAlertRequest) {
  return null;
}