W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2013

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

From: Domenic Denicola <domenic@domenicdenicola.com>
Date: Thu, 3 Oct 2013 13:34:19 +0000
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <DE8252A7-6E6D-4DB4-A221-30736AA076D8@domenicdenicola.com>
> 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:18 UTC