Commit d2a093f
Update readme
Changed files (3)
Diff
@@ -382,7 +382,7 @@ dependencies = [ [[package]] name = "kaja-callback-macro"-version = "1.0.1"+version = "1.0.2" dependencies = [ "gloo", "gloo-console",@@ -1,6 +1,6 @@ [package] name = "kaja-callback-macro"-version = "1.0.1"+version = "1.0.2" edition = "2024" description = "Callback macro for kaja-web" license = "MIT"@@ -18,12 +18,16 @@ fn some_on_click_function(event: SomeClickEvent) { log!("event.index: {:?}", event.index); } -// This example allows you to call the Rust function from JavaScript like this:-let html = html! {{- <button onclick="someClickCallback({- index: 1- })">Run WASM Callback</button>-}};+pub fn example() -> String {+ // This example allows you to call the Rust function from JavaScript like this:+ let html = html! {{+ <button onclick="someClickCallback({+ index: 1+ })">Run WASM Callback</button>+ }};++ html+} #[wasm_bindgen(start)] pub fn init() {