On Mar 10, 11:30 am, Jim Higson <j...@wikizzle.org> wrote:
> On Tuesday 10 March 2009 14:06:17 kangax wrote:
> > Writing `hasOwnProperty.call(object, property)` is a bit tedious. Why
> > not just encapsulate the `call`?
> Ah, yes, I imagined we'd be adding hasOwnProperty to Object.prototype to make
> the bad browsers like the good. Given the subject, probably not wise :-)

We thought about it too, of course. I actually don't mind extending
native prototypes if it is done to "fix" broken behavior.
Unfortunately, in Safari 2 adding `hasOwnProperty` to
`Object.prototype` would *not* give it a DontEnum flag and so it would
be iterated over with for/in. Oh well : )


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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to