W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2011

Re: Lazy interface objects?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 21 Sep 2011 22:18:00 -0400
Message-ID: <4E7A9AD8.8000207@mit.edu>
To: "Mark S. Miller" <erights@google.com>
CC: David Flanagan <dflanagan@mozilla.com>, Jonas Sicking <jonas@sicking.cc>, public-script-coord@w3.org
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.

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

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:04 UTC