manuelp22
11/04/2016, 12:12 PM<button onclick="SampleProject.testMethod()" href="#">SUBMIT</button>
2) But when calling a Kotlin function with a parameter from Javascript:
Like this
<button onclick="SampleProject.testMethodWithParam(25)" href="#">SUBMIT</button>
I get the following error for that line
TypeError: SampleProject.testMethodWithParam is not a function
Main.kt is:
public fun testMethod(){
println("testMethod triggered")
}
public fun testMethodWithParam(something: Int){
println("testMethodWithParam triggered")
}
Could somebody please guide me on what is wrong here?