With this 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>
In Firefox and Opera, the output is "bar", but in Chrome, the output is "foo". If I skip the definition __proto__, all browsers display a "bar".
How do I get Chrome (8.0) to display the value of an object for an object, rather than the value set on the prototype?
source
share