[Javascript] property instead of method

liorean liorean at gmail.com
Wed May 24 17:17:30 CDT 2006


On 24/05/06, Geoff Knutzen <geoffreyk at seanet.com> wrote:
> Nothing wrong with calling it as a method. That is probably what I will end
> up doing. I was just wondering if there was a way that I was not familiar
> with to make this a property.

If you want it dynamic, no, you can't do that in plain JavaScript. Moz
allows getters and setters, so for gecko based browsers it's doable,
but not for iew, op or saf.

> Just trying to learn a bit. And cheat if I must :)

No shortcuts for this yet, I'm afraid.
-- 
David "liorean" Andersson
<uri:http://liorean.web-graphics.com/>



More information about the Javascript mailing list