Context: My project is to write DOMado, the "real" DOM taming, in terms of ES5 
rather than Cajita-runtime taming facilities.

It was suggested to use proxies to do so. However, the bulk of the DOM taming 
is defined as some sort of property getters and setters, or can be.

Is there any reason that DOMado tame nodes should be proxies rather than 
objects using Object.defineProperty -- some real-DOM behavior which requires 
proxies to emulate?

The one I can see is if it is desirable for expando properties to be shared 
among all sandboxes (as they currently are, stored in node.properties___) 
rather than being specific to a sandbox (stored on the tame-nodes). Even so, we 
could use the design where the prototype of an object is a proxy, thus getting 
catch-all for unknown property names while still using the ES5-builtin property 
descriptor features for the ordinary case (thus hopefully reducing dispatch 
overhead in a real-ES5 world).

-- 
Kevin Reid                                  <http://switchb.org/kpreid/>

Reply via email to