My javascript interface shows method is not a function
I want to get html soruce using webview and I'm using javascriptinterface to do that.
but I saw "Uncaught TypeError: window.jsi.getHtml is not a function" error.
This code is creation javascriptinterface: webView.addJavascriptInterface(JSI::class.java, "jsi")
this is my custom javascriptinterface class
public class JSI {
@JavascriptInterface
public fun getHtml(html: String)
{
Log.d("asdf", html)
}
}
and I call javascript by this
webView.webChromeClient = object:...