Internet Explorer weirdness - function item() { [n

2019-01-28 07:36发布

See image:

enter image description here

Similar question on Microsoft website: http://connect.microsoft.com/IE/feedback/details/785194/function-item-native-code

Tried Google.com, Facebook, StackOverflow - every website I visit has this weird feature. Fire up your IE9 (haven't tested other versions) and type item in you development console.

If I haven't tried other websites I would think that there is a <div id="item"> see also:

So on this occasion the question is - why function item() is present on so many websites when IE is used?


UPDATE: super simplified test case. enter image description here

1条回答
女痞
2楼-- · 2019-01-28 08:05

It's a function on the window object. in Internet Explorer. It's not part of the websites, in other words, it's part of the browser.

It's from the HTMLCollection interface, part of the DOM spec. Internet Explorer seems to consider the window object to be a collection.

查看更多
登录 后发表回答