I have a few ideas on how to make the notification center useful and curious if anyone has tried with electron (or it is at all possible)?
Haven’t tried it but I’ve been thinking about this for the past few days. I have three ideas that come to mind but I’m decently far from executing. In each case the premise is similar - create a generic Today Widget application with a list of webviews that can be receive webview html as input over a stdin or websocket.
(1) Create small Today Widget application, and like what was done with terminal-notifier call into it from a spawned child process.
(2) If possible, create a Today Widget application in C(++) and create a binding using node-gyp, node-ffi, or nan to bridge node and C. By writing in C(++) you can import all of the appropriate objective-c/swift libraries like Foundation.h and can have them run natively on mac. The Today Widget needs to exist inside a container app so by it being called from electron, perhaps that’ll satisfy the requirement but possibly not. This is a hack version compared to option 3.
(3) Create new electron build with the generic Today widget embedded and a hook exposed. This is probably the right way to do it.