Google is committed to advancing racial equity for Black communities. See how.

JavaScriptReplyProxy

abstract class JavaScriptReplyProxy
kotlin.Any
   ↳ androidx.webkit.JavaScriptReplyProxy

This class represents the JavaScript object injected by WebViewCompat#addWebMessageListener(android.webkit.WebView, String, Set, * WebViewCompat.WebMessageListener). An instance will be given by WebMessageListener#onPostMessage. The app can use postMessage(String) to talk to the JavaScript context.

There is a 1:1 relationship between this object and the JavaScript object in a frame.

Summary

Public methods
abstract Unit
postMessage(@NonNull message: String)

Post a String message to the injected JavaScript object which sent this .

Public methods

postMessage

abstract fun postMessage(@NonNull message: String): Unit

Post a String message to the injected JavaScript object which sent this .

Parameters
message String: The data to send to the JavaScript context.