On Wed, Sep 3, 2008 at 10:58 PM, Brendan Eich <[EMAIL PROTECTED]> wrote:
>> If deletable and
>> configurable were distinct, we could make new properties of the global
>> object start as configurable but not deletable.
>
> Saving perf but to what end? Does the Caja, etc. programming model
> require configurability before freezing for all global props, or a
> few, or one?
>
>
>> However, adding
>> another attribute to deal with this one problematic case seemed
>> overkill. Allowing non-configurable properties to be made non-writable
>> seems like the simplest adequate solution.
>
> Not arguing, just recapitulating and asking for the Caja use-case.


The use case is that the Caja runtime gets loaded into a frame after
writable-but-non-deletable properties that we wish to whitelist have
been added to the global object. The Caja runtime needs to freeze all
whitelisted objects and properties reachable from from the global
object.

In ES3.1 as we're proposing it, the only way to represent that a
property is non-deletable is to make it non-configurable. If writable
non-configurable properties could not be made non-writable, the use
case above would be screwed.


-- 
 Cheers,
 --MarkM
_______________________________________________
Es-discuss mailing list
Es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to