MODE_W - a minimal desktop in javascript

I decided that since I've been writing my new H2D2 programming language, it would be good to have some kind of web-based environment to run some H2D2 programs in. So I started writing something in javascript to try and do that. I started calling it MODE (Minimal Operation Desktop Environment) but then I decided to add 'W' for web as well, so I'm naming it mode_w for the moment.

The main idea was for it to be minimalistic - so it's a character based system only. I always remember thinking that the work Microsoft did with MinWin was cool, so that's one of my influences. I always remember that Windows flag logo animated from ASCII characters...

Since I wanted to be able to run several things at the same time, I built a primitive window based environment - but one that works with keyboard control only, and in a browser.

Already I've got something which can move, resize, open and close windows. Everything is simply rendered into a <pre> tag with a monospace font, so theres no mucking about with <div> blocks or anything, just an array of strings that represent the screen - one string for each line on the screen.

Each 'window' draws its own content (which scrolls when it runs out of space) and this means that I can do different things in different windows. So each window becomes a kind of widget, in a text-only kind of way.

I have also allowed character input into each window which can post back a command to a webservice, and this means you can have a command processor running as a web service somewhere else. Of course, different windows could point to different command processors, so a variety of tasks can be done from the one environment.

Here's a screenshot of how it looks so far:

So before I get H2D2 running in mode_w I'm building a few experimental widgets, like the google search widget, just to see how well it works and to iron out any issues. The google search widget allows you to type in a search term and see the top matching URLs.

And maybe I'll build an expression parsing widget which could also be used as a calculator. But after that I will try and get it to host some H2D2 programs, since that is why I made it in the first place...