I was interested in Slate because I was looking for a good way to implement pie menus for a Mac window manager. And I'd already implemented pie menus for HTML, so I wanted to come up with a way to use that code (and any other html user interface or graphics too, of course) in the window manager.
About 5 years ago I opened this issue, describing an experiment I did making the web browser in a topmost window with a transparent background to implement user interface overlays scripted in HTML.
WebView window for HTML user interfaces like pie menus to Slate. #322: https://github.com/jigish/slate/issues/322
Slate used a hidden WebView for its scripting engine. So I made it un-hidden and float on top of all the other windows, and was easily able to use it to draw any kind of user interface stuff on top of all the other Mac windows. And I could track the position of windows and draw a little clickable tab next to or on top of the window title bar, that you could click on to pop up a pie menu.
It actually worked! But I didn't take it much further, because I never got any feedback on the issue I opened, so gave up on using Slate itself, and never got around to starting my own JavaScript window manager myself (like you did!). I opened my issue in June 2013, but the last commit was Feb 2013, so development must have stopped by then.
But I wrote up a description of my ideas about "aQuery" (like jQuery, for accessibility), and bounced the idea off of some people who are into accessibility and user interface design, and learned about Morgan Dixon's work on Prefab, something you should definitely check out if you're developing a window manager.
https://donhopkins.com/mediawiki/index.php/AQuery
Here's an HN posting that describes Morgan Dixon's "Prefab" -- imagine how powerful a window manager would be if it could do all that stuff, fully programmable from JavaScript, in combination with full access to the Accessibility APIs.
https://news.ycombinator.com/item?id=11520967
Morgan Dixon's work is truly breathtaking and eye opening, and I would love for that to be a core part of a scriptable hybrid Screen Scraping / Accessibility API approach.
Screen scraping techniques are very powerful, but have limitations. Accessibility APIs are very powerful, but have different limitations. But using both approaches together, screencasting and re-composing visual elements, and tightly integrating it with JavaScript, enables a much wider and interesting range of possibilities.
Think of it like augmented reality for virtualizing desktop user interfaces. The beauty of Morgan's Prefab is how it works across different platforms and web browsers, over virtual desktops, and how it can control, sample, measure, modify, augment and recompose guis of existing unmodified applications, even dynamic language translation, so they're much more accessible and easier to use!