windowjs / windowjs

Window.js is an open-source Javascript runtime for desktop graphics programming.

Home Page:https://windowjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support headless subprocesses

joaodasilva opened this issue · comments

Every subprocess created with Process.spawn() also gets its own window.

It can set window.visible = false to prevent it from showing up.

But ideally, it should be possible to pass --headless to make the subprocess never create its native window and just run code. In those cases, window and window.canvas wouldn't exist in the global object.

Most of the work to support that involves adapting the main loop to "wait for events" without using GLFW; the main event source would be libuv instead (e.g. wake-up whenever more bytes are received from the parent process or from a subprocess).