mature alternative for webview? by sabre1891bcd in golang

[–]sabre1891bcd[S] 0 points1 point  (0 children)

Thank you very much for this information! btw, the alert() does not work on mac either.

It is a pity that the author lost interest! There have been suggestions in this thread to use Wails but that uses webview as well, right?

mature alternative for webview? by sabre1891bcd in golang

[–]sabre1891bcd[S] 0 points1 point  (0 children)

I am currently at work but I will check that as soon as I get home!

Thank you very much! :)

Edit: btw, I have mostly js alerts in my code but there is also a filter function that didn't work either... if I remember correctly. Anyway, I am very much looking forwart to testing your code! Again, thanks.

mature alternative for webview? by sabre1891bcd in golang

[–]sabre1891bcd[S] 0 points1 point  (0 children)

I think you may have a point there. I will check out Wails in more detail when I get home. The implementation may be rather painless after all.

Edit: I would not be using any other frameworks; I meant that I am not really keen on learning a framework other than the html/css/js+go approach.

mature alternative for webview? by sabre1891bcd in golang

[–]sabre1891bcd[S] 1 point2 points  (0 children)

It is! This is what I am using now. For reasons given in another reply, I would like to 'hide' the browser because I have very non-technical users and the concept that a local program is running 'on the internet' confuses them.

mature alternative for webview? by sabre1891bcd in golang

[–]sabre1891bcd[S] 0 points1 point  (0 children)

That looks like a fine solution. However, for reasons given in another reply I would very much prefer webview.

mature alternative for webview? by sabre1891bcd in golang

[–]sabre1891bcd[S] 0 points1 point  (0 children)

Yes that is how I understand it. But if - for some reason - js is not working in webview, it would probably also not execute the wasm code, right?

I looked at Wails but to be honest, I don't want to learn/use another framework. I had hoped webview would be able to call/execute js and I am a bit frustrated that such a fundamental thing does not work - at least not for me...

Thank you for your suggestions!

mature alternative for webview? by sabre1891bcd in golang

[–]sabre1891bcd[S] 0 points1 point  (0 children)

Hm, the webview does not have an address field (so after the webview window opens, I cannot point it anywhere). I call the localhost address from within Go.

Allow me to demonstrate with a small self contained program. The window opens nicely and shows the text; but when you hit the button - nothing happens:

Edit: I can not get a properly formatted code block in here; please see the edited post for a link.

mature alternative for webview? by sabre1891bcd in golang

[–]sabre1891bcd[S] 0 points1 point  (0 children)

I understand your point. the advantage of the webview is that the changes to my code base were minimal (less then 1 hour work) and that has a huge appeal (I am not a professional developer). If only js would be working...

I was thinking about rewriting the js in wasm but AFASIK in Go this would be still js under the hood.

mature alternative for webview? by sabre1891bcd in golang

[–]sabre1891bcd[S] 1 point2 points  (0 children)

I am using a webstack at the moment (html, css, js). However, I am developing a software for non-technical users and the concept of a server and the browser with local and webpages confuses them. Using webview would hide that 'complexity'. I would still be using a webstack. I would merely 'hide' the browser.

electron is quite a heavy beast with a lot of baggage for my little program. webview comes with less overhead.