0

I would like to do something like this, where func is a Javascript function defined.

html! {
  <button onclick="func(1, 2, 3)">Click me</button>
}

However, the compiler keeps telling me that I'll need to use a rust callback instead. I'm doing ssr, so the way they are trying to make me add rust code to the page just wouldn't work.

Is there a way to just have a javascript function as onclick?

Siriusmart
  • 187
  • 1
  • 12

0 Answers0