In progress
JavaScript
Latest commit 504a178 May 5, 2012 @Benvie quick doc fix

README.md

Still a work in progress

The goal of this work is to explore what is possible to do with the DOM when you try like you really mean it. Things are just starting to come together but it's still crazy insane.

What the hell is this?

Live mirror of the DOM with javascript. That is: a full shell shell DOM, based on code generated from actual DOM IDL. It's built in such a way that assuming a fake JS shell DOM object is paired with an actual real DOM object somewhere behind the scenes, it'll function entirely correctly. All newly accessed real DOM objects are wrapped before ever seeing the light of day, so it's possible to fully interact with this fake shell DOM without ever touching the real one.

How can I make it do stuff?

Right now, when you run svg.browser.js, you'll find a new global object wrap. This function will wrap any DOM element passed to it with a dopplegangar. If passed an HTML or SVG tagname it'll create a new element of that type and return the wrapper.

If you need to interact with unwrapped DOM elements you can do element.unwrap() to get the real one back. Currently I haven't bothered with any of the HTML DOM so this is needed to attach the initial SVGSVG element to the document. I'll fix this soon.