webview / webview_deno

🌐 Deno bindings for webview, a tiny library for creating web-based desktop GUIs
https://deno.land/x/webview
MIT License
1.44k stars 75 forks source link

The bind function example stopped working after updating to Deno 1.31.2 #152

Closed ds604 closed 1 year ago

ds604 commented 1 year ago

The function binding example (https://github.com/webview/webview_deno/blob/main/examples/bind.ts) was running fine before updating to Deno 1.31.2 (or 1.31.3, which I just tried). But now when I press the button, nothing prints to the terminal. This is how I'm running it:

deno run -Ar --unstable https://raw.githubusercontent.com/webview/webview_deno/main/examples/bind.ts

The window pops up fine (which is awesome, I love this project and wish I could count on it to continue working), but the function binding doesn't seem to work, and I'm not sure how to debug it. If you have any hints on how to go about debugging when things break, I tried to see what's going on, but some things like encodeCString scared me off. But if fixing things with that is what it might take to keep using this, I'd give it a shot.

aaronhuggins commented 1 year ago

I've got a fix for this in PR #153. Until it's merged and released, I've tagged it as a pre-release in my fork.

import { Webview } from 'https://raw.githubusercontent.com/aaronhuggins/webview_deno/0.7.6-preview2/mod.ts';
ds604 commented 1 year ago

Works! Thanks for addressing this.