onJsPrompt property

  1. @override
Future<JsPromptResponse?> Function(InAppWebViewController controller, JsPromptRequest jsPromptRequest)? onJsPrompt
final

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

jsPromptRequest contains the message to be displayed in the prompt dialog, the default value displayed in the prompt dialog, and the of the page requesting the dialog.

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

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

Implementation

@override
final Future<JsPromptResponse?> Function(
        InAppWebViewController controller, JsPromptRequest jsPromptRequest)?
    onJsPrompt;