[Project_owners] JS behavior in FF 1.5
zboogs at gmail.com
Thu Dec 8 16:10:30 EST 2005
Wladimir is right of course. Sorry bout that.
On 12/8/05, Wladimir Palant <trev at gtchat.de> wrote:
> On 12/9/05, Aaron Boodman <zboogs at gmail.com> wrote:
> > > 2. How should I use associative arrays if unexpected values like this
> > > are returned?
> > Don't use arrays as associative arrays. They didn't work before,
> > either. For example "length" would have shown up in 1.0.7. Use objects
> > as associative arrays, that's what they're there for.
> This helps but not a lot. Objects still have predefined properties
> like 'watch' or 'eval'. If you want to avoid collisions, you have to
> add a space before the key name:
> var assoc = new Object();
> var key = 'watch';
> alert(assoc[' ' + key]);
> key = 'map';
> assoc[' ' + key] = 'value';
More information about the Project_owners