Code Monkey home page Code Monkey logo

Comments (13)

AlbertShown avatar AlbertShown commented on September 4, 2024

Hey, did you add <script src="webui.js"></script> to your UI?

from webui.

zhuewizz avatar zhuewizz commented on September 4, 2024

i not add <script src="webui.js"></script>,i will try aigan!!,thanks

from webui.

zhuewizz avatar zhuewizz commented on September 4, 2024

I try add webui.js,still not fine
I use vue and npm run build
webui.show
web.w.ShowBrowser
i all try

from webui.

AlbertShown avatar AlbertShown commented on September 4, 2024

To know what exactly causing this we need the webui's logs, please follow those instructions.

To get webui logs please follow this:

  1. Download the latest nightly build or stable release
  2. Copy debug version of webui dynamic library webui-xx-xx-xx/debug/webui.so (or .dll, .dynlib... depend on your OS)
  3. Past and replace your installed Go packages with this debug version :
    a. Can be in $GOPATH or $HOME/go
  4. Run your app again in the terminal, you will get webui's log as well
  5. Copy logs and share it here

from webui.

AlbertShown avatar AlbertShown commented on September 4, 2024

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?

from webui.

zhuewizz avatar zhuewizz commented on September 4, 2024

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

from webui.

AlbertShown avatar AlbertShown commented on September 4, 2024

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.

from webui.

AlbertShown avatar AlbertShown commented on September 4, 2024

If you still have any issue, please run it locally, add webui.js, then share the webui's logs here.

from webui.

zhuewizz avatar zhuewizz commented on September 4, 2024

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?

from webui.

AlbertShown avatar AlbertShown commented on September 4, 2024

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.

from webui.

AlbertShown avatar AlbertShown commented on September 4, 2024

More info: https://github.com/webui-dev/webui?tab=readme-ov-file#how-does-it-work

from webui.

zhuewizz avatar zhuewizz commented on September 4, 2024

i use python-webui show the same uri,not add webui.js ,but run and work fine!!
why use go-weiui is not fine ?

from webui.

AlbertShown avatar AlbertShown commented on September 4, 2024

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.

from webui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.