On Thu, Jul 31, 2014 at 1:23 AM, Boris Zbarsky <[email protected]> wrote: > And the Web IDL spec has yet another approach to this whole thing: It simply > coerces "configurable" to true in its custom [[DefineOwnProperty]] for these > sorts of objects (but keeps effectively separate namespaces).
Interesting. This approach doesn't seem quite kosher. ES6 lists some invariants here that apply to all objects, even host objects: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-invariants-of-the-essential-internal-methods There's not a rule that says flat-out, "If Desc.[[Configurable]] is false and [[DefineOwnProperty]](P, Desc) returns true, that counts as 'observing' the property P as a non-configurable property on the target." but if you take that as read, what WebIDL is doing here is banned. Note that steps 14-22 of 9.5.6 (Proxy#[[DefineOwnProperty]]) do some checks which enforce this rule. http://people.mozilla.org/~jorendorff/es6-draft.html#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc Tom, can the prose be improved? What's the intent? -j _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

