webview-zig icon indicating copy to clipboard operation
webview-zig copied to clipboard

Bind and Dispatch examples

Open james-elicx opened this issue 9 months ago • 1 comments

Hello!

I was just taking a look at the library and it isn't clear to me how binding should be used.

I thought it would just be try w.bind("testFn", testFn);, but then I'd be passing a function where it expects a struct that it can access .func on, and as a result it fails to compile.

I would appreciate it if there was an example for how binding works as part of the examples in the repo :)

james-elicx avatar Mar 15 '25 23:03 james-elicx

Here it is bind 👍

thechampagne avatar Mar 16 '25 02:03 thechampagne