WebView.AddJavascriptInterface(Object, String) WebView.AddJavascriptInterface(Object, String) Method

Definition

Injects the supplied Java object into this WebView.

[Android.Runtime.Register("addJavascriptInterface", "(Ljava/lang/Object;Ljava/lang/String;)V", "GetAddJavascriptInterface_Ljava_lang_Object_Ljava_lang_String_Handler")]
public virtual void AddJavascriptInterface (Java.Lang.Object object, string name);
abstract member AddJavascriptInterface : Java.Lang.Object * string -> unit
override this.AddJavascriptInterface : Java.Lang.Object * string -> unit

Parameters

object
Object Object

the Java object to inject into this WebView's JavaScript context. Null values are ignored.

name
String String

the name used to expose the object in JavaScript

Remarks

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