Domenic Denicola (2015-01-28T19:08:13.000Z)
d at domenic.me (2015-01-28T19:17:27.019Z)
Ah, I see! So then another non-intuitive (but invariant-preserving) consequence would be: ```js Object.defineProperty(window, "prop", { value: "foo" }); var propDesc = Object.getOwnPropertyDescriptor(window, "prop"); if (propDesc.configurable) { Object.defineProperty(window, "prop", { value: "bar" }); // this will fail, even though the property is supposedly configurable, // since when it forwards from the WindowProxy `window` to the underlying // Window object, the Window's [[DefineOwnProperty]] fails. } ``` Am I getting this right?
d at domenic.me (2015-01-28T19:12:41.308Z)
From: Mark S. Miller [mailto:erights at google.com] > In this situation, it will try and succeed. This more closely obeys the intent in the original code (e.g., the comment in the jQuery code), since it creates a non-configurable property on the *Window* W. It does not violate any invariant, since all that's observable on the *WindowProxy* (given the rest of your draft spec, which remain unchanged) is a configurable property of the same name. Ah, I see! So then another non-intuitive (but invariant-preserving) consequence would be: ```js Object.defineProperty(window, "prop", { value: "foo" }); var propDesc = Object.getOwnPropertyDescriptor(window, "prop"); if (propDesc.configurable) { Object.defineProperty(window, "prop", { value: "bar" }); // this will fail, even though the property is supposedly configurable, // since when it forwards from the WindowProxy `window` to the underlying // Window object, the Window's [[DefineOwnProperty]] fails. } ``` Am I getting this right?