On 10/24/07, Jean-Philippe Encausse <[EMAIL PROTECTED]> wrote:
> Unfortunately, using it has brought this issue to our attention :
> Object.prototype, prototype.js will break in several places when
> for/in loops.
Months ago, I started an initiative to replace all for..in loops in
Prototype with "safe" loops (ones that check if a property is inherited from
Object.prototype and skip it). However, I was quickly convinced by Sam and
others that this effort is futile - it would make all the loops slower just
In short, Object prototype is verboten. Prototype library will break if you
augment Object.prototype, and this is not likely to change.
Your test page uses json.js, the most common culprit of this breakage.
Prototype users complained a lot that they can't use JSON with Prototype
since it breaks Ajax (that was the breakage most visible when you augment
Object.prototype). Since then, Tobie Langel has done so much wonderful work
on JSON in Prototype that there is no need for json.js anymore. We could
say, json.js is verboten :)
I hope this clears up the issue.
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to firstname.lastname@example.org
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at