This seems quite bizarre.
Here's my experiment in the IE8 console:
typeof obj1 // "object"
obj1.hasOwnProperty // {...}
typeof obj2 // "object"
obj2.hasOwnProperty // undefined
Any ideas as to what could cause this?
This seems quite bizarre.
Here's my experiment in the IE8 console:
typeof obj1 // "object"
obj1.hasOwnProperty // {...}
typeof obj2 // "object"
obj2.hasOwnProperty // undefined
Any ideas as to what could cause this?
This example is from IE8, but the same return is from IE6+ and most other IE browsers.
IE before #9 does not define it for host objects
var o=window;// or document or document elements
o.hasOwnProperty
/* returned value: (undefined)
undefined
*/
Object.prototype.hasOwnProperty.call(window,name)
? –
Llewellyn hasOwnProperty
, but one can successfully use Object.prototype.hasOwnProperty.call(domElement,name)
. –
Deon © 2022 - 2024 — McMap. All rights reserved.
difference between native objects and host objects?
: #7614817 – Rideout