Internet Explorer怪异 - 功能项目(){[本机代码]} - 它做什么? [英] Internet Explorer weirdness - function item() { [native code] } - what does it do?

查看:165
本文介绍了Internet Explorer怪异 - 功能项目(){[本机代码]} - 它做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

参见图片:





微软网站上的类似问题:。它不是网站的一部分,换句话说,它是浏览器的一部分



它来自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:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆