After creating a ‘register’ button in the webview, I want to navigate directly to a specific component when I click ‘func register’ in Kotlin.
Kotlin logic is structured like this.
// Android
inner class JavaScriptInterface
{
@JavascriptInterface
@SuppressWarnings("unused")
fun register(data: String){
navigate(
ridday202208Ev.actionHaydxn2208EventToEventJoinForm()
)
}
}
This is javascript code.
function register() {
}
return (
<button onClick={() => register()}></button>
)
When you click the register function in Javascript code, the webview recognizes the register function and wants to call navigate. I don't know how to deal with it.
<button onClick="register()"></button>