Subj : Re: Fallback property getter in JavaScript? To : Lev Serebryakov From : Brendan Eich Date : Thu Oct 06 2005 11:29 pm Lev Serebryakov wrote: > Is it possible to add to object "default property getter", which will > be called with property name as parameter? > > For example, I want to implement object, whcih will load its > properties from database on demand, or something like this. I don't > want to write "object.prop( name )", I like "object[name]". Is it > possible in pure JS with SpiderMonkey's extensions? > > Yes, I know, it is possible to implements this in C "inside" > SpiderMonkey, but is it possible in JavaScript? Not yet, but shaver was hacking up a patch the other week.... /be .