News for hackers. Stuff that matters.
Re:ElectronJS alternative: SciterJS – HTML/CSS/JS in 4.5 MB ... by madeofpalk on Friday October 16, 2020 @06:47AM (#24799489)
> Until, at least, all major modern OSes come with a built in scriptable headless browser engine

One of the main advantages of shipping your own browser like Electron or SciterJS is that it's a fixed, stable target where you can be a lot more confident about browser compatibility because you're only supporting a single browser + version.

Re:ElectronJS alternative: SciterJS – HTML/CSS/JS in 4.5 MB ... by c-smile on Friday October 16, 2020 @10:07AM (#24800931)
#2. Browsers are for browsing - desktop and mobile application UI requires far more than that.

Browsers are catching up of course but... Who would thought that the thing for reading pages will need access to your file system or make screenshots...

#3. UI engine must have natural and effective means to use native code - to be embeddable and extendable by hosting application.

In native app world you don't need WebAssembler for example - you can run native code you need natively.

Re:ElectronJS alternative: SciterJS – HTML/CSS/JS in 4.5 MB ... by madeofpalk on Friday October 16, 2020 @12:55PM (#24802644)
> #3. UI engine must have natural and effective means to use native code - to be embeddable and extendable by hosting application.

It does! Most browsers are written in "native code" and use it to do layout. When you use an <input /> field on a website, you get a natively rendered UI widget with native OS behaviour!

Re:ElectronJS alternative: SciterJS – HTML/CSS/JS in 4.5 MB ... by c-smile on Friday October 16, 2020 @01:41PM (#24803121)
"It does!" at some extent that is far from being adequate for native UI needs.

Consider that you need add <word>...</word> element that will implement natively MS Word editing area. This will allow you to define MS Word editing chrome in HTML/CSS but keep core editing functionality native and effective.

Consider implementation of <tabs> native element/behavior: https://github.com/c-smile/sciter-sdk/blob/master/include/be...

This is a demo of how native code can extend DOM - adding native "drivers" of app specific DOM elements. Yet there are other examples of native behaviors: https://github.com/c-smile/sciter-sdk/tree/master/include/be...

Essentially native behavior can do anything that built-in elements can do, even drawing on the same surface that the rest of DOM is using.

Good luck with achieving anything like that in browsers, or in Electron, or with WebAsm or whatever.

Re:ElectronJS alternative: SciterJS – HTML/CSS/JS in 4.5 MB ... by tambourine_man on Friday October 16, 2020 @08:31AM (#24800143)
Exactly, but we can check for feature support and adapt accordingly. We did it for the seen for years.
Re:ElectronJS alternative: SciterJS – HTML/CSS/JS in 4.5 MB ... by c-smile on Friday October 16, 2020 @02:59PM (#24803901)
What if you have no browser for the platform at all?

What should you do if you need your app to run on W2000 for example (IE 6.0 anyone?) ?

Sometimes people do need that: https://sciter.com/necromancing-sciter-on-windows-2000/

Re:ElectronJS alternative: SciterJS – HTML/CSS/JS in 4.5 MB ... by vikramkr on Friday October 16, 2020 @08:51AM (#24800302)
Right, but I'm getting the sense that people may have done it for years, but all that did was engender a desire to never have to worry about compatibility again
Re:ElectronJS alternative: SciterJS – HTML/CSS/JS in 4.5 MB ... by whoisthemachine on Friday October 16, 2020 @02:19PM (#24803496)
It really is the age old debate between static and dynamic libraries.