Open zhuewizz opened 2 months ago
Hey, did you add <script src="webui.js"></script>
to your UI?
i not add ,i will try aigan!!,thanks
I try add webui.js,still not fine
I use vue and npm run build
webui.show
web.w.ShowBrowser
i all try
To know what exactly causing this we need the webui's logs, please follow those instructions.
To get webui logs please follow this:
webui-xx-xx-xx/debug/webui.so
(or .dll, .dynlib... depend on your OS)$GOPATH
or $HOME/go
Another thing, please share part of code where you use webui.
Also, I still don't see webui.js
in https://tmui.design/h5, it's not updated yet?
https://tmui.design/h5, It's using vue UI framework, I didn't develop it, I'm testing it locally, my code looks like this: //ui.SetRootFolder("ui") //w.Show("https://tmui.design/h5") w.Show("https://vant-ui.github.io/vant/mobile.html#/zh-CN") // Prepare the second window. ui.Wait() When I was developing locally, I added webui.js The message appeared in the interface. When I did the route in the spa program, it would appear: Resource not available. I ran it directly in the browser, and there was no such phenomenon on every page This situation is random, and the program exits
I see, as I said, it won't work if you can't add webui.js
to the UI.
webui will run the window for you, and load the URL for you, but if your UI (HTML) does not include webui.js
then there is no connection between your window and backend.
Solution is to add <script src="webui.js"></script>
to https://tmui.design/h5
.
If you still have any issue, please run it locally, add webui.js
, then share the webui's logs here.
I'll get around to testing it,thks https://tmui.design/h5.is Other people do demo sites, I can't change I added it locally, but the right click in the application can't open it, I see in the browser: webui.js not found What does webui.js do?
I will explain, webview
embed the whole HTML/JS engine in your project, and it need WebView runtime libraries to be installed in your OS, but the result is you can for example get events from an external website, like https://tmui.design
.
WebUI does it in another faster way, simply it run the installed web browser, and connect the web browser with your backend using WebSocket trough webui.js
, you don't need any runtime... but, WebUI can not give you event of an external web site if you can not add webui.js
.
i use python-webui show the same uri,not add webui.js ,but run and work fine!! why use go-weiui is not fine ?
not add webui.js
Impossible!
work fine!!
Yes, python-webui
will run the UI, but you won't receive any click events or anything without webui.js
.
I've tried several times, on the same website, comparing webui-go with webview-go using a package generated by npm run buider: h5, and it looks like this: webui-go: Click for a period of time, a white screen appears randomly, and the error is that js cannot be called dynamically Automatic program exit webview-go is absent I don't quite understand why? Calling from the website: https://tmui.design/h5 i test at window and ubuntu