logoalt Hacker News

teddyhyesterday at 1:39 PM4 repliesview on HN

I know nothing about any of these APIs, but the claim of the article seems weird. If naitive APIs are insufficient, or slow, or unsuitable, and implementing your own is too hard, then how does Electron even do what it does? One would assume that Electron has its own library to accomplish the task, in which case this code could either be separated, or re-created once and for all, into its own re-usable library.


Replies

L_Rahmanyesterday at 7:09 PM

You can just implement Prosemirror from one of the greatest web teams on the planet and get pretty much every text editing nicety for free - markdown rendering, document version history, blocks, tables. If you choose to deal with prosemirror-collab-cmmit, yjs, or automerge you also get eventually consistent multiplayer. All the "I wish this was a native app" people don't understand the cathedrals that have been built on the web.

fassssstyesterday at 3:14 PM

Chromium has had an insane amount of investment from many large companies. Way more than native UI frameworks have had over the last decade or so.

jeremyjhyesterday at 1:58 PM

> I know nothing about any of these APIs

Agreed. In Chromium all the content from HTML is rendered inside a single object from the point of view of the host UI; much like a game engine’s UI rendering. Chromium draws everything itself. Host events like mouse and keyboard events are sent to that top level object (although there are some shenanigans involved to make it look more native to accessibility tools).

tantaloryesterday at 1:53 PM

Electron is just a thin shell around Chromium