A New Kind Of Web Framework
To get an idea of how far off the beaten path this code is, let's build a button and put it on the page:
button = HTML('element:','button')('contains:','test button')('style:',)('on:','click','e| console.log(this); console.log(e)')('to:',200,100)
If you load up the blank page in the iframe below you'll see it in action:
It works by creating a Self-ish object that has a read/write able slot to contain an HTMLElement and a set of 5 methods that provide styling, positioning, content setting, creation, and event handling:
This combination turns out to be all you need to build rather complicated web applications.