Amici,hasOwnProperty HTMLElement Firefox
Ho notato in Firefox v23.0.1 che, hasOwnProperty
di HTMLElement (ingresso, button..etc) non funziona,
button1.hasOwnProperty('id') = false
che uso per per controllare :
var str1 = '';
for (pp in button1) {
if (button1.hasOwnProperty(pp)) {
str1 += (',' + pp);
}
}
alert(str1);//nothing here
ma in chrome hasOwnProperty funziona bene.
sai che si tratta di un errore?
test un po 'più ampiamente e troverete i browser in uso che non supportano * * hasOwnProperty su oggetti DOM, né realizzare qualsiasi tipo di eredità. – RobG