Added in API level 23
    WebMessage
open class WebMessage
| kotlin.Any | |
| ↳ | android.webkit.WebMessage | 
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 | |
|---|---|
| WebMessage(data: String!)Creates a WebMessage. | |
| WebMessage(data: String!, ports: Array<WebMessagePort!>!)Creates a WebMessage. | |
| Public methods | |
|---|---|
| open String! | getData()Returns the data of the message. | 
| open Array<WebMessagePort!>? | getPorts()Returns the ports that are sent with the message, or  | 
Public constructors
WebMessage
Added in API level 23
      WebMessage(data: String!)
Creates a WebMessage.
| Parameters | |
|---|---|
| data | String!: the data of the message. | 
WebMessage
Added in API level 23
      WebMessage(
data: String!,
ports: Array<WebMessagePort!>!)
Creates a WebMessage.
| Parameters | |
|---|---|
| data | String!: the data of the message. | 
| ports | Array<WebMessagePort!>!: the ports that are sent with the message. | 
Public methods
getPorts
Added in API level 23
      open fun getPorts(): Array<WebMessagePort!>?
Returns the ports that are sent with the message, or null if no port is sent.
