[Prototype-core] Re: $H({}).get('__proto__') in Firefox =)

2009-09-22 Thread kangax
On Sep 21, 4:40 pm, Yaffle vic99...@yandex.ru wrote: base2.js uses prefix for it's Map Class Yes, but it uses a 1 char string - '#' - so the chance of collisions is still high (imo). [...] -- kangax --~--~-~--~~~---~--~~ You received this message because you

[Prototype-core] Re: $H({}).get('__proto__') in Firefox =)

2009-09-22 Thread Allen Madsen
kangax, there are no collisions if everything is prefixed like Yaffle suggests. Allen Madsen http://www.allenmadsen.com On Tue, Sep 22, 2009 at 8:03 AM, kangax kan...@gmail.com wrote: On Sep 21, 4:40 pm, Yaffle vic99...@yandex.ru wrote: base2.js uses prefix for it's Map Class Yes, but it

[Prototype-core] Re: $H({}).get('__proto__') in Firefox =)

2009-09-21 Thread Yaffle
base2.js uses prefix for it's Map Class On 14 сен, 19:53, Yaffle vic99...@yandex.ru wrote: Sorry, I'm not following again :) What's not necessary? Which requests will be more expensive? May be, for-in loop will iterate a little more ...

[Prototype-core] Re: $H({}).get('__proto__') in Firefox =)

2009-09-14 Thread Yaffle
There is an issue with Hash#toObject method... I think, Ajax.Base#parameters can be Hash instead of object to avoid call to Hash#toObject... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To

[Prototype-core] Re: $H({}).get('__proto__') in Firefox =)

2009-09-14 Thread kangax
On Sep 14, 6:18 am, Tobie Langel tobie.lan...@gmail.com wrote: Sorry, I'm not following. How does prefixing a key avoid object creation? We can't inject stuff directly onto a hash instance. We still need an object for that. Not necessarily. Though that might make some requests more

[Prototype-core] Re: $H({}).get('__proto__') in Firefox =)

2009-09-13 Thread Yaffle
++IE dontEnum bug =) var h = $H({}); h.set('toString',1); alert(h.toJSON()); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to

[Prototype-core] Re: $H({}).get('__proto__') in Firefox =)

2009-09-13 Thread kangax
On Sep 13, 9:32 am, Yaffle vic99...@yandex.ru wrote: var h = $H({}); h.set('__proto__','sadfdsf'); alert( typeof( h.get('__proto__') )); That's a known limitation, actually (although, probably not documented anywhere). There's no key coercion in Prototype's Hash implementation, which is why

[Prototype-core] Re: $H({}).get('__proto__') in Firefox =)

2009-09-13 Thread Yaffle
You're right, `hasOwnProperty` can be useless, and `propertyIsEnumerable` is useless becauseof dontEnum IE bug... Why not to patch Hash to use some prefix for keys? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Prototype-core] Re: $H({}).get('__proto__') in Firefox =)

2009-09-13 Thread Tobie Langel
Why not to patch Hash to use some prefix for keys? That was my plan for 1.7, actually. It fixes that issue and also avoids creating an extra, internal object. Good to see that we're on the same page, here. Tobie --~--~-~--~~~---~--~~ You received this message

[Prototype-core] Re: $H({}).get('__proto__') in Firefox =)

2009-09-13 Thread kangax
On Sep 13, 6:38 pm, Tobie Langel tobie.lan...@gmail.com wrote: Why not to patch Hash to use some prefix for keys? That was my plan for 1.7, actually. It fixes that issue and also avoids creating an extra, internal object. Sorry, I'm not following. How does prefixing a key avoid object