Bug 135008

Summary: document.body.hasOwnProperty('childNodes') returns false
Product: WebKit Reporter: ShihChi Huang <huge.huang+webkitbug>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: annevk, foghostor, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: Other   

Description ShihChi Huang 2014-07-16 22:45:23 PDT
I cannot use webkit nightly in Yosemite so not sure if it's still a problem in latest build.

However, both Safari 8.0 and iOS Safari 8.0 returns false while executing below expression

```js
document.body.hasOwnProperty('childNodes')
```
Comment 1 Sam Weinig 2014-07-17 15:42:26 PDT
This is expected, since the childNodes property is now on the prototype.  Is this breaking something for you?
Comment 2 ShihChi Huang 2014-07-17 17:54:06 PDT
May I know what's the expected behavior? 

in safari prior to ios8 / yosemite and latest stable chrome browser it still returns true while executing document.body.hasOwnProperty('childNodes')
Comment 3 Junwei Liang 2014-10-27 23:37:42 PDT
Any update on this?
We have exactly the same problem when call 'hasOwnProperty' on DOM elements.
In safari prior to ios8/yosemite, it always returns true!

````js
var el = document.getElementById('dummy-div-id');
console.log(el.hasOwnProperty('className')); // false
````
Comment 4 Anne van Kesteren 2023-12-29 03:12:53 PST
This is the expected behavior as per comment 1 and all browsers these days agree.