Re: Lazy interface objects?

On 9/21/11 9:15 PM, Mark S. Miller wrote:
>     My goal is to implement as much of DOM Core and HTML as I can in
>     pure JavaScript where I have Proxy and WeakMap, but do not control
>     the global object.  [...]  In this thread, my concern is that WebIDL
>     requires interface object properties to have a [[Writable]]
>     attribute and therefore (and possibly unintentionally) rules out
>     implementations that use accessor properties. [...]
> Hi David, I don't understand why this is difficult to do using proxies.
> This seems like exactly the kind of allowed host-object-weirdness that
> proxies were designed to emulate. What am I missing?

David is not controlling the global object.  He's getting his script 
which implements the DOM run against some existing global.

There is no facility in ES5 to create new globals or to replace the 
current (and only, per spec!) global with a proxy of your choice.


Received on Thursday, 22 September 2011 02:18:30 UTC