On Wed, Sep 11, 2013 at 10:28 AM, Erik Arvidsson
<erik.arvidsson at gmail.com> wrote:
> What does the following do?
>
> var x = 1;
> var m = new Module({
> get x() {
> return x;
> }
> });
> print(m.x);
> x++;
> print(m.x); // ???
>
> Does ToModule do a [[Get]] or does it keep the accessor?
[[ToModule]] does a [[Get], so both of those lines print 1.
> What about setters? Does it keep identity of the getter function?
Sam
domenic at domenicdenicola.com (2013-09-25T01:32:57.236Z)
[[ToModule]] does a [[Get]], so both of those lines print 1.