DEV Community

Pacharapol Withayasakpunt
Pacharapol Withayasakpunt

Posted on

Is there Webview that downloads Chromium if required, and install globally?

I wonder if this is a good idea, as well.

This stems from the thought that on Windows, especially on older versions, you might have merely IE, making webview/webview and neutralino.js bad ideas.

But, if I bundle Chromium, as in Electron or nw.js, it would exaggerate file size. Not sure if that is important...

A middle path is indeed, download and install globally, if not exists.

Top comments (4)

Collapse
 
lexlohr profile image
Alex Lohr

There's already such a thing for rust called alcro and for go called lorca which utilizes a pre-installed Chromium, Google Chrome or will install Chromium.

In any case, I'm still in two minds about the whole business of native apps vs. packaged web apps. If you can do such a web app right, you don't need a webview/neutralino.js/electron/nw.js installation.

Additional abilities could be added with a hybrid approach (be aware of security implications) which is then independent of the browser. The obvious advantage is that you can develop one front end for all systems and experience over different devices will be consistent. At the same time, you'll lose consistence with the UX of the OS.

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

I don't really understand why can't web engines be installed like Java Runtime Environment (JRE)? That is, global by default.

Maybe, breaking production is hell, but again, why not

{
  "dependencies": {
    "electron": "6"
  }
}

That is, pinned dependencies, but ok with minor version updates.

Collapse
 
lexlohr profile image
Alex Lohr

But they are installed on virtually every operating system intended for end users: browsers. The power of the web is interoperability. Why don't we wield it anymore? What happened in the last decade that everyone now insists of only supporting one single version of one single rendering engine?

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

It seems that Lorca cannot download Chrome (yet).

Download Chromium if not already installed #95

Although in most cases Chrome/Chromium is already present, it might make sense to download the executable if it can not be found (for better user experience). Somehow github.com/puppeteer/puppeteer is able to do that (downloading portable chromium - github.com/puppeteer/puppeteer/blo...). This would also fix #12

If there are any volunteers to implement this - I'd be happy to merge the PR ;)