On 10/21/2009 01:00 PM, Pedro wrote:
> Hi all,
>
> According to
https://bugzilla.mozilla.org/show_bug.cgi?id=478047,
> newer versions of SpiderMonkey now throw a TypeError: setting a
> property that has only a getter instead of silently ignoring the
> assignment as before.
>
> var o = { get p() { return "a"; } };
> o.p = "b";
>>> TypeError: setting a property that has only a getter
>
> Although I understand the reasons behind the change, isn't Mozilla
> worried about introducing a change that breaks backwards compatibility
> with already existing JavaScript code? What's your take on this issue?
Hmm. My reading of the April 2009 draft is that ES5 requires the
TypeError in strict mode only. It requires that the assignment silently
do nothing in non-strict mode.
-j
_______________________________________________
dev-tech-js-engine mailing list
dev-tech-js-engine@...
https://lists.mozilla.org/listinfo/dev-tech-js-engine