Re: JSIDL ideas for read only (Was: RE: Figuring out easier readonly interfaces)

> On 3 Oct 2013, at 13:59, "Boris Zbarsky" <bzbarsky@MIT.EDU> wrote:
> 
>> On 10/3/13 8:17 AM, Domenic Denicola wrote:
>> Just to be more helpful, I've done the complete desugaring, with branding for both sides, in [2].
> 
> That actually still doesn't help me.  I should have been clearer about what my question was.
> 
> If DOMPoint defines a getter but not setter for a property, that's pretty straightforward: DOMPoint.prototype has an own property descriptor where [[Get]] is the getter and [[Set]] is undefined.  All good so far.
> 
> Now if DOMPointMutable extends DOMPoint and defines only a setter for the property, what is the [[Get]] of the own property descriptor for that property on DOMPointMutable.prototype?  Does it pick up the [[Get]] that DOMPoint.prototype had for the property at the point at which the property is defined on DOMPointMutable?  Does it have undefined?  Does it have whatever the value of [[Get]] is on DOMPoint.prototype at the point when you do the [[GetOwnProperty]] call?  Something else?
> 
> That is, what does this desugar into in terms of actual Object.create() and Object.defineProperty() calls, for those of us who are not intimately familiar with the ES6 class syntax?

Oh! It's just like ES5 object literals. A getter without a setter means no setter. The answer is `undefined`.

Received on Thursday, 3 October 2013 13:35:01 UTC