DEV Community

Pacharapol Withayasakpunt
Pacharapol Withayasakpunt

Posted on

Webview I wanted to see, and some requested features

Backend

For a slightly more complicate webview, or need an interaction with filesystem (or a persistence / database), you will need a backend.

Since backend is outside the scope of web browser, you will need a runtime other than web browser, or use native code.

  • Java Runtime Environment (JRE) is quite common. But end-users don't necessarily have installed JRE. Also, it might be less common nowadays? (Not sure.) Also, the size is a little large, if bundled with the app.
  • Deno runtime for JavaScript / TypeScript is surprisingly small (< 20 MB)? Also, it is a single file, and can easily be copied.
  • Not sure if I can just tell users to install Python or Node.js, or even Docker? That will make life much more simple.
  • Still, double clicking to run console application might involve creating a shell script. And, it might not work as intended on double click sometimes. (Might need right clicking in Linux Mint.) Not to mention, terminal with browser looks intimidating.
  • Cross compilation to native (on a single platform). xgo is an example of this. (Thanks to the popularity of Golang.)

Decent web engine

I don't want to see unsupported, or unreliable web features.

Sadly, web engines with desktop UI customization (Electron, NW.js), although exist, no one want to install it globally.

With merely Chrome DevTools Protocol (or similar in Firefox), first clear thing I see, is that I cannot change Dock icon in macOS.

Frame

I generally prefer window to be as big as possible, as long as it doesn't fall off screen. It is call "maximize", not "fullscreen". Fullscreening has different effect, especially on macOS.

Security on localhost web server

Pretty sure this is much less talked about. pywebview does concern about this, especially on CSRF attacks.

Jupyter Notebook does this correctly with token-based authentication.

GitHub logo patarapolw / webview-server

webview for web servers, with focus on customizability and security

I did what I need to compile for all platforms.

Top comments (0)