onPostMessage property

OnPostMessageCallback? get onPostMessage

Event that receives a message sent by a postMessage() on the injected JavaScript object.

Note that when the frame is file: or content: origin, the value of sourceOrigin is null.

  • message represents the message from JavaScript.
  • sourceOrigin represents the origin of the frame that the message is from.
  • isMainFrame is true if the message is from the main frame.
  • replyProxy is used to reply back to the JavaScript object.

Official Android API: https://developer.android.com/reference/androidx/webkit/WebViewCompat.WebMessageListener#onPostMessage(android.webkit.WebView,%20androidx.webkit.WebMessageCompat,%20android.net.Uri,%20boolean,%20androidx.webkit.JavaScriptReplyProxy)

Implementation

OnPostMessageCallback? get onPostMessage => platform.onPostMessage;