Javascript 在_proto__上设置的属性直接覆盖在Chrome中设置的属性

Javascript 在_proto__上设置的属性直接覆盖在Chrome中设置的属性,javascript,google-chrome,Javascript,Google Chrome,使用此html: <select><option>hi</option></select> <script type="text/javascript"> var select = document.getElementsByTagName("select")[0]; select.__proto__.setValue = "foo"; select.setValue = "bar"; alert(select.setValue

使用此html:

<select><option>hi</option></select>

<script type="text/javascript">

var select = document.getElementsByTagName("select")[0];

select.__proto__.setValue = "foo";
select.setValue = "bar";

alert(select.setValue);

</script>
hi
var select=document.getElementsByTagName(“选择”)[0];
选择;
select.setValue=“bar”;
警报(选择.setValue);
在Firefox和Opera中,输出是“bar”,但在Chrome中,输出是“foo”。如果我跳过
\uuuu proto\uuuu
定义,所有浏览器都会输出“bar”


如何让Chrome(8.0)输出特定于对象的属性值,而不是原型上设置的值?

如上所述,这在Chrome的当前版本中得到了解决。

在Chrome 9和Chrome 10中工作正常,因此这很可能是一个错误。作为旁注,不要弄乱内置对象,这对HTMLElements仍然适用。@Ivo:我可以确认它在Chrome8中不起作用。作为旁注,我想当几个浏览器试图实现相同的非标准功能时,就会发生这种情况——至少其中一个浏览器肯定会出错:-p@AndyE我相信我可以在问题列表的某个地方找到一个bug,如果我在接下来的两天里搜索它的话(目前为9.0.*)修复了它。