Dela via


WebChromeClient.OnConsoleMessage Method

Definition

Overloads

OnConsoleMessage(ConsoleMessage)

Report a JavaScript console message to the host application.

OnConsoleMessage(String, Int32, String)
Obsolete.

Report a JavaScript error message to the host application.

OnConsoleMessage(ConsoleMessage)

Report a JavaScript console message to the host application.

[Android.Runtime.Register("onConsoleMessage", "(Landroid/webkit/ConsoleMessage;)Z", "GetOnConsoleMessage_Landroid_webkit_ConsoleMessage_Handler")]
public virtual bool OnConsoleMessage (Android.Webkit.ConsoleMessage? consoleMessage);
[<Android.Runtime.Register("onConsoleMessage", "(Landroid/webkit/ConsoleMessage;)Z", "GetOnConsoleMessage_Landroid_webkit_ConsoleMessage_Handler")>]
abstract member OnConsoleMessage : Android.Webkit.ConsoleMessage -> bool
override this.OnConsoleMessage : Android.Webkit.ConsoleMessage -> bool

Parameters

consoleMessage
ConsoleMessage

Object containing details of the console message.

Returns

true if the message is handled by the client.

Attributes

Remarks

Report a JavaScript console message to the host application. The ChromeClient should override this to process the log message as they see fit.

Java documentation for android.webkit.WebChromeClient.onConsoleMessage(android.webkit.ConsoleMessage).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

OnConsoleMessage(String, Int32, String)

Caution

deprecated

Report a JavaScript error message to the host application.

[Android.Runtime.Register("onConsoleMessage", "(Ljava/lang/String;ILjava/lang/String;)V", "GetOnConsoleMessage_Ljava_lang_String_ILjava_lang_String_Handler")]
[System.Obsolete("deprecated")]
public virtual void OnConsoleMessage (string? message, int lineNumber, string? sourceID);
[<Android.Runtime.Register("onConsoleMessage", "(Ljava/lang/String;ILjava/lang/String;)V", "GetOnConsoleMessage_Ljava_lang_String_ILjava_lang_String_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member OnConsoleMessage : string * int * string -> unit
override this.OnConsoleMessage : string * int * string -> unit

Parameters

message
String

The error message to report.

lineNumber
Int32

The line number of the error.

sourceID
String

The name of the source file that caused the error.

Attributes

Remarks

Report a JavaScript error message to the host application. The ChromeClient should override this to process the log message as they see fit.

This member is deprecated. Use #onConsoleMessage(ConsoleMessage) onConsoleMessage(ConsoleMessage) instead.

Java documentation for android.webkit.WebChromeClient.onConsoleMessage(java.lang.String, int, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to