Udostępnij za pośrednictwem


WebView.CreateWebMessageChannel Method

Definition

Creates a message channel to communicate with JS and returns the message ports that represent the endpoints of this message channel.

[Android.Runtime.Register("createWebMessageChannel", "()[Landroid/webkit/WebMessagePort;", "GetCreateWebMessageChannelHandler", ApiSince=23)]
public virtual Android.Webkit.WebMessagePort[] CreateWebMessageChannel ();
[<Android.Runtime.Register("createWebMessageChannel", "()[Landroid/webkit/WebMessagePort;", "GetCreateWebMessageChannelHandler", ApiSince=23)>]
abstract member CreateWebMessageChannel : unit -> Android.Webkit.WebMessagePort[]
override this.CreateWebMessageChannel : unit -> Android.Webkit.WebMessagePort[]

Returns

the two message ports that form the message channel.

Attributes

Remarks

Creates a message channel to communicate with JS and returns the message ports that represent the endpoints of this message channel. The HTML5 message channel functionality is described here

The returned message channels are entangled and already in started state.

Java documentation for android.webkit.WebView.createWebMessageChannel().

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