[Harmony Proxies] Non-extensible, sealed and frozen Proxies

Tom Van Cutsem tomvc.be at gmail.com
Wed Sep 7 11:20:02 PDT 2011


2011/9/7 Mark S. Miller <erights at google.com>

> On Wed, Sep 7, 2011 at 7:10 AM, Tom Van Cutsem <tomvc.be at gmail.com> wrote:
>
>> 2011/9/7 David Bruant <david.bruant at labri.fr>
>>
>>> **
>>> Emulating the DOM, probably. It would still be possible to have
>>> non-extensible trapping proxies, but not turn the proxy into a native DOM
>>> Document/Node/Element/HTMLElement/DocumentFragment, etc... This could create
>>> some bad performance penalty for DOM Traversers [1] for instance (or
>>> querySelectorAll). Would it even be possible to have an "hybrid" DOM tree
>>> with native DOM Node and emulated DOM Node?
>>>
>>
>> So a sealed/frozen DOM element requires no more interposition at all?
>>
>
> I don't understand the question or how you got there.
>

I asked earlier "I don't know whether there is a use case that requires
[proxies "becoming" host objects when fixed]." To which David replied
emulating the DOM. I found that odd, since a proxy that "becomes" a DOM node
loses the ability to interpose as well. Hence my question asking whether DOM
elements can do without interposition when fixed.

Judging from the rest of the conversation, I think David and I
misunderstood. David, correct me if I'm wrong, but what I now think you
meant is that proxies should at least be able to fake the [[Class]] of a DOM
node, not necessarily that a proxy should "become" a plain DOM object and
lose its ability to trap.


> Certainly, for security purposes, sealed/frozen DOM nodes still carry
> tremendous authority, and so we still need to interpose proxy-wrappers for
> them.
>

That's what I thought.

Cheers,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110907/1d01de89/attachment.html>


More information about the es-discuss mailing list