Monday, June 3, 2024
104
rated 0 times [  105] [ 1]  / answers: 1 / hits: 23975  / 13 Years ago, wed, november 16, 2011, 12:00:00

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?


More From » internet-explorer-8

 Answers
91

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
*/

[#89078] Tuesday, November 15, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
karivictoriab

Total Points: 530
Total Questions: 90
Total Answers: 95

Location: Honduras
Member since Sun, Dec 26, 2021
2 Years ago
;