How well can an Electron-based app fit in with the underlying operating system?
If running on a Mac, can an Electron-based app expose itself via AppleScript so that other applications can interact with them? If running on Windows, can it expose itself via COM? On Linux can it register itself with DBus (I'm not sure if this even makes sense - what's the Linux equivalent of COM/AppleScript)?
On the Mac, does the stuff in the Services menu work? Do text fields get automatic spell-check? Can I double-tap 'fn' to start dictation? Can it expose itself to the Accessibility stuff in a meaningful manner?
These things don't make sense for all applications. I can't think of why I'd want to interact with an HN application via AppleScript (or COM), for example, but there are other types of applications where being able to do this would be great (Excel and Word base their entire macro facility on COM, for example).
I can see wanting to use Dictation in an HN app as it might make commenting easier for some people. Same goes for the text field spell-checking.
I guess the big question is, where can an Electron app fit in the spectrum between 'web site rendered in a dedicated application' and 'full-blown Windows/Mac/Linux desktop application'?
My guess is that almost none of them bother. I looked at the documentation for Atom, which seems to be the flagship Electron application, and there's no mention of its API being exposed to the system (AppleScript on MacOS and COM on Windows), even though it does have a very rich API.
A quick search seems to confirm that there is no useful AppleScript support:
https://discuss.atom.io/t/applescript-support/1439
https://discuss.atom.io/t/accessing-the-contents-of-a-window...
The second discussion mentions that there is a dictionary, my guess would be that it comes from the underlying Chrome browser. Interestingly enough, looking at the dictionary for Google Chrome, it appears that they have made an effort to expose things that make sense for a browser to expose to AppleScript.
I hate Electron. :-|
Oh, there goes that dream.
However, at least on OS X, you can just use something like Fluid if that's all you want (http://fluidapp.com/).