ES accessor usage guidelines (Was: Map/Set.prototype.size)

Yehuda Katz wycats at gmail.com
Mon Oct 15 14:45:12 PDT 2012


Yehuda Katz
(ph) 718.877.1325


On Mon, Oct 15, 2012 at 5:41 PM, Brendan Eich <brendan at mozilla.org> wrote:

> Yehuda Katz wrote:
>
>>
>>     * get/set accessor may have effects on 'set' (see the DOM) but
>>     only on the receiver object (and unobservably, any children that
>>     become garbage, e.g. when trimming .length on an array-like).
>>
>>
>> DOM methods like `innerHTML=` seem to violate this particular wording
>> (but perhaps not the spirit?)
>>
>
> Definitely the spirit!
>
> That's one of those "children become garbage" cases, unless I
> misunderstand your point. "The receiver" for .innerHTML includes all
> descendants.


Yeah that makes sense, although the exact side-effects might be more
observable with DOM. Relatedly, are we specifically exempting
Object.observe and DOM Mutation observers from the "observability"
requirement?


>
>
> /be
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121015/de23548d/attachment.html>


More information about the es-discuss mailing list