Hi,

Extending Object.prototype is regarded as a Bad Thing[1].

The main reason being that cross-browser support for hasOwnProperty is
fairly recent (Safari 2 doesn't have it for example).

Best,

Tobie

[1] http://erik.eae.net/archives/2005/06/06/22.13.54/

On Mar 5, 6:34 pm, Jim Higson <[email protected]> wrote:
> On Thursday 05 March 2009 16:16:05 Jim Higson wrote:
>
> > Hi,
>
> > Is anybody else finding this? Does Prototype from git work with FF3.1?
>
> On closer inspection, it is quite easy to get Prototype to throw similar
> errors even in FF3. It just happens that my present code only provokes it in
> 3.1.
>
> For example here:http://users.ox.ac.uk/~admn2094/test.html
>
> Basically, writeAttribute tries to add an attribute called 'foo' somewhere
> with the value
> "function foo(){ return "@@" }" and this fails because of the illegal @ char.
>
> Are you not allowed to extend Object when using prototype? Prototype doesn't
> seem to do any hasOwnProperty checks:
>
> http://yuiblog.com/blog/2006/09/26/for-in-intrigue/
>
> File as a bug?
>
> --
> Jim
> my wiki ajaxification thing:http://wikizzle.org
> my blog:http://jimhigson.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to