getter / setters

Irakli Gozalishvili rfobic at gmail.com
Thu May 20 13:36:37 PDT 2010


Thanks to everyone for a good explanation, as I was assuming my expectations
were wrong, guess partially, because of the SpiderMonkey's behavior in past
(Thanks Brendan for clearing this up, I was pretty sure that was the
behavior in xulrunner, apparently it's in past now :).

--
Irakli Gozalishvili
Web: http://www.jeditoolkit.com/
Phone: +31 614 205275
Address: Taksteeg 3 - 4, 1012PB Amsterdam, Netherlands


On Thu, May 20, 2010 at 20:54, Mike Samuel <mikesamuel at gmail.com> wrote:

> 2010/5/20 Oliver Hunt <oliver at apple.com>:
> >> So for a non host object o,
> >>  o.x = o.x - 1
> >> should yield a number regardless of the details of any setter for x on
> >> o, assuming o is not frozen and said setter returns normally.
> >
> > The assignment operator is defined in the language fairly clearly in a
> way that means that the behaviour is unaffected by the type of object being
> assigned to -- eg. being a host object or not is (mercifully) not relevant
> :D
>
> Quite right.  Sorry for being confusing.
> I ran into a corner case for IE6 and IE7 where postfix ++ does not
> always yield a number, e.g. when applied to some host objects.  The
> comment at line 80 of
>
> http://code.google.com/p/google-caja/source/browse/trunk/tests/com/google/caja/browser-expectations.html
> is my best recollection.
>
>
>
>
> >
> > --Oliver
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20100520/a5ead5f7/attachment.html>


More information about the es-discuss mailing list