Window.js is a subset; it doesn't include the DOM nor the CSS APIs, nor a lot of web APIs.
Window.js is a tool I wish I had for exploratory 2D (and 3D) programming, without having to install multiple tools, SDKs and runtimes, and without the restrictions that web pages have when it comes to desktop applications. I wanted something like Processing but with more control, or like <canvas> but without all the browser cruft around it, and in a native window.
I think it could be a very useful tool to learn WebGL via webglfundamental.org, for example, and having something that runs on the desktop quickly.
A goal of Window.js is to eventually run Processing (p5.js), Pixi.js, Phaser and Threejs programs, as long as they don't use the DOM too much.
Isn’t that a lot of work? Or is there an obvious way to hook it up that I’m missing?
This has already been done for Processing/p5.js:
https://windowjs.org/about/processing
After the initial load, all of the p5.js APIs make CanvasRendering2DContext calls, which Window.js implements natively.
Almost all of the p5.js examples work with this approach, except those that use DOM elements like buttons and sliders. Those elements could also be faked, with some patience :-)
I think it's pretty cool that p5.js scripts can run on a desktop window this way, outside of the browser!
As an aside, I also originally intended to implement an HTML renderer on something like Window.js, and make a "browser from scratch" based on it. Maybe for another day...
Lua is a good scripting language, but it doesn't have the ubiquity of JS (and Löve doesn't have the ubiquitous deployment of the modern browser). Also, Lua doesn't have a static type ecosystem (though there are interesting projects like TypescriptToLua [2] exploring that space, but you can from the name they are following/lagging the JS ecosystem here).
There probably is a need to package more browser games as "real" games and a lightweight Canvas-focused approach could find a nice like Löve, especially if it were easier, for instance, to maybe port to consoles for small/indie game teams than one of the web views or Electron. (Though certainly Microsoft already has a version of WebView2 running on the Xbox.)