WebMessageCompat
open class WebMessageCompat
kotlin.Any | |
↳ | androidx.webkit.WebMessageCompat |
The Java representation of the HTML5 PostMessage event. See https://html.spec.whatwg.org/multipage/comms.html#the-messageevent-interfaces for definition of a MessageEvent in HTML5.
Summary
Public constructors | |
---|---|
Creates a WebMessage. |
|
<init>(@Nullable data: String?, @Nullable ports: Array<WebMessagePortCompat!>?) Creates a WebMessage. |
Public methods | |
---|---|
open String? |
getData() Returns the data of the message. |
open Array<WebMessagePortCompat!>? |
getPorts() Returns the ports that are sent with the message, or |
Public constructors
<init>
WebMessageCompat(@Nullable data: String?)
Creates a WebMessage.
Parameters | |
---|---|
data |
String?: the data of the message. |
<init>
WebMessageCompat(
@Nullable data: String?,
@Nullable ports: Array<WebMessagePortCompat!>?)
Creates a WebMessage.
Parameters | |
---|---|
data |
String?: the data of the message. |
ports |
Array<WebMessagePortCompat!>?: the ports that are sent with the message. |
Public methods
getPorts
@Nullable open fun getPorts(): Array<WebMessagePortCompat!>?
Returns the ports that are sent with the message, or null
if no port is sent.