I use a membrane to transitively wrap the entire DOM, then load arbitrary code on top of it (such as jQuery), sending all actions over websocket.
More About This Demo From The Author
This demo represent a large chunk of work on a whole suite of collected topics. The core of it builds upon the membrane interface I've created using proxies which allows for a fully wrapped and instrumented DOM doppelganger, By shadowing globals and loading a library using Function, I then force it to access everything through the membrane. This works and is successfully able to load all of jQuery unmodified onto my fake DOM. From there I attempt to keep two remote browsers in sync by faithfully reproducing all events from the target to the source at an extremely fine level of detail. Essentially the remote target is a dumb target, which has need have nothing more than a DOM implementation. I've attempted to create an interface for linking up people to share DOMs between them but that part needs more work.
Launching the demo through here won't work since it relies on a Node.js server. A link to my server running the demo is at the source link to the right.
Get the Source Code
This demo is released under the MPL/GPL/LGPL license.