On Jul 3, 6:16 pm, Hannes Wallnoefer <[EMAIL PROTECTED]> wrote:
> On Jul 3, 10:15 pm, Norris Boyd <[EMAIL PROTECTED]> wrote:
>
>
>
> > Yep, I think Rhino's behavior should be different: for an assignment
> > to a property with only a getter defined, the assignment should cancel
> > out the getter.
>
> But shouldn't defining a getter without a setter imply the property is
> read-only? At least that's the behaviour documented for getters
> defined via jsGet_/jsSet_:
>
> http://www.mozilla.org/rhino/apidocs/org/mozilla/javascript/Scriptabl...)
>
> I'm not sure generic java getters and setters are handled the same
> way, and I'm not sure they should be. But at least it's conceivable
> that people have been using it this way, so it might be a good idea to
> be careful with changes here.
>
> hannes
>
> > I've createdhttps://bugzilla.mozilla.org/show_bug.cgi?id=443491and
> > have a fix.
>
> > --Norris

Well, this is an API call where there is a flag passed in that can be
set to read only, or not. The specific case mentioned in this post is
when the property is not read only. It is an odd case; you could also
argue it should just be an error not to have the property set to read
only when you only supply a getter, but then there's a larger
backwards compatibility issue.

--N
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to