Internet Explorer怪异 - 功能项目(){[本机代码]} - 它做什么? [英] Internet Explorer weirdness - function item() { [native code] } - what does it do?
问题描述
参见图片:
微软网站上的类似问题:。它不是网站的一部分,换句话说,它是浏览器的一部分。
它来自HTMLCollection接口,DOM规范的一部分。 Internet Explorer似乎将窗口
对象视为集合。
See image:
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:
- Do DOM tree elements with ids become global variables?
- How to force Chrome (or any other WebKit browser) not to use "default" tag names? (this is my question asking how to stop it)
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.
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.
这篇关于Internet Explorer怪异 - 功能项目(){[本机代码]} - 它做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!