webui-dev / webui

Use any web browser or WebView as GUI, with your preferred language in the backend and HTML5 in the frontend, all in a lightweight portable lib.
https://webui.me
MIT License
2.35k stars 144 forks source link

feat: get all available browsers? #431

Closed jinzhongjia closed 1 week ago

jinzhongjia commented 1 week ago

It may not be enough to only get the best browser, because different browsers are slightly different, so return all browsers and let the developer decide which one is better?

hassandraga commented 1 week ago

return all browsers

I guess we can add this API to the core, then let wrappers loop trough all browsers and then create a native array of available browsers.

if (webui_browser_exist(Firefox)) {
    // ...
}
hassandraga commented 1 week ago

Implemented (https://github.com/webui-dev/webui/commit/d0b013ccda380b730ba9b64af1e45dc05291974c).