webview_bind

public abstract Unit webview_bind(    Pointer webview,     String name,     WebviewJNA.WebviewLibrary.webview_bind_fn_callback callback,     Pointer arg)

Binds a native Kotlin/Java callback so that it will appear under the given name as a global JavaScript function.

Callback receives a request string. Request string is a JSON array of all the arguments passed to the JavaScript function. Internally it uses webview_init.

Parameters

webview

the handle of webview, usually returned by webview_create

name

the name of the global JavaScript function

callback

the Kotlin/Java callback function wrapper in an interface, use webview_return to response to the JS request.