Open marad opened 4 weeks ago
Sorry, I can't debug this problem at the moment because I don't have a mac But we can temporarily mark the issue as
I think that there is a value in having this just hanging here for now. If anyone encounters the same problem the description also outlines the "workaround" so might be helpful in that way.
if I bind all events (with "") in Webview it doesn't pass through any
webui use websockets, it does not use webview APIs, so you need to make sure you are including webui.js
in your webview HTML, and also hit F12
and make sure the webui.js
http request is 200
.
doesn't quit the app after closing last Webview window
webui does not track webview window using APIs, but it tracks how many websocket clients are connected, so when you close the window, maybe macOS keep websocket connection open or something... Another thing, webui will always stay connected if you set timeout to 0
(webui_set_timeout(0);).
I'm trying to think of any other way to capture the window closing event
All events including open and close are inside bind all events (with ""), but it seems you don't get any for some reason.
Can you use the debug version of webui to see logs?
@AlbertShown should I change something in the dependencies to use the debug version?
I don't know if Zig build have a debug option, but you can manually download webui lib, then copy the one from debug
folder and replace your Zig project with it.
should I change something in the dependencies to use the debug version?
This is actually quite a good point, the Zig webui
wrapper should support building and using the debug version of the library. I'll create a separate issue to track this.
Update: after #70, webui will now show logs when building in debug mode.
I think the title says it all. I'm running the on hash 1220f7cb9608ca0b5946bee76bb9fe3867aa5cab47990d9cf02339d89dc7ae1d9a32.
I'm trying to think of any other way to capture the window closing event but can't figure it out.
// Edit I did some tests. I checked that Firefox and Chrome work fine. Safari doesn't start at all. And the "no quitting" problem seems to be related to
webui.Brrowser.Webview
.I've also noticed that if I bind all events (with
""
) in Webview it doesn't pass through any - this might be connected.Anyway - I'm going to use
webui.Browser.ChromiumBased
and it should work for my use case.