WebIDL attribute reflection

Boris Zbarsky bzbarsky at mozilla.com
Sat Dec 29 22:49:56 PST 2012

On 12/29/12 10:42 PM, Boris Zbarsky wrote:
> If I'm not misreading the code, it actually hangs its DOM
> property getters/setters of the prototype internally, makes them look
> like own properties on objects when reflected via
> getOwnPropertyDescriptor, and has magic to make a property lookup return
> the getter/setter pair internally and have their interpreter and JIT
> call those.

One other note.  SpiderMonkey used to have some things sort of like this 
(though not quite as well-integrated with the JIT); I believe they've 
been actively trying to remove them precisely because they end up being 
a pain to reflect in terms of property descriptors.  The line I've heard 
from that direction has been to use proxies for weird stuff, 
getter/setters or real value properties for non-weird stuff.

Now obviously you can use proxy semantics to describe even things that 
don't really _need_ to be all that weird.  When you have a hammer and 
all... ;)


More information about the es-discuss mailing list