Add Object.hasOwnProperty()
Reported by John-David Dalton | July 28th, 2008 @ 06:25 AM | in 1.6.1
This patch adds Object.prototype.hasOwnProperty for Safari 2.0.2 that doesn't support it. It does checks to make sure that the addition will not enumerate.
Comments and changes to this ticket
-
John-David Dalton July 28th, 2008 @ 06:25 AM
- → State changed from new to enhancement
-
-
Andrew Dupont July 29th, 2008 @ 05:25 AM
As a sanity check, it would be great if we could find a machine that still has 2.0 (and only 2.0) installed, and verify that this patch works the way we think.
-
John-David Dalton July 29th, 2008 @ 06:18 PM
Bad news I tested the patch on Safari 2.0 (via the multiple download) and it still enumerated in the for-in loops (hasOwnProperty is undefined before the addition).
I will hunt someone down with Safari 2.0 and have them test it as well.
We can always make it Object.hasOwnProperty() or something.
-
John-David Dalton July 29th, 2008 @ 06:59 AM
"Tiger shipped originally with Safari 2.0" so i might reinstall Tiger to see if it will run Safari 2.0 :P
-
John-David Dalton July 30th, 2008 @ 04:27 AM
- → Title changed from Add Object#hasOwnProperty to Add Object.hasOwnProperty()
Ok I confirmed that the native Safari 2.0 enumerates over the Object.prototype.hasOwnProperty().
I will make a patch for Object.hasOwnProperty()
-
-
John-David Dalton July 30th, 2008 @ 05:08 PM
- no changes were found...
-
Juriy Zaytsev July 31st, 2008 @ 06:53 AM
- → Tag cleared.
Can we just drop a god damn 2.0.2?
It's quite insane how nonconformant it is with ECMA (hasOwnProperty is just a tip of the iceberg, if I'm not mistaken).
Freedom to use hasOwnProperty throughout the library will make it much more consistent and reliable.
Apple, btw, dropped support for Safari
-
-
Juriy Zaytsev August 5th, 2008 @ 03:14 AM
I have just downloaded "Version 2.0.2 (416.12)".
`hasOwnProperty` exists and works as expected.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The Prototype JavaScript library.
