webui-dev / webui

Use any web browser or WebView as GUI, with your preferred language in the backend and modern web technologies in the frontend, all in a lightweight portable library.
https://webui.me
MIT License
2.37k stars 146 forks source link

Feature Request: showBrowser function should accept external web url #272

Closed 7flash closed 7 months ago

7flash commented 7 months ago

Let's say in my usecase I am using WebUI to spawn my html app which needs to interact with another window running external app (instagram)

It would work well if showBrowser and show functions on WebUI could be extended to accept external URL as well currently html or local file

I understand there might be a challenge to insert webui.js into external app, but I am sure it's possible, at last it would be acceptable to install a browser extension injecting webui.js into it

AlbertShown commented 7 months ago

Based on webui.h in line: https://github.com/webui-dev/webui/blob/7c9f4040177b541ea4b343e4b6941c7592b5b0b9/include/webui.h#L205

You can actually set your URL http://..., but it's your responsibility to put webui.js on the UI.

7flash commented 7 months ago

Interesting.. any particular reason it's http and not https?

AlbertShown commented 7 months ago

I guess you can use HTTPS, not sure, please test and let me know 👍

hassandraga commented 7 months ago

Yes, you can use HTTPS directedly. But you need to inject webui.js... myWindow.show('https://www.mydomain.com/')