J
Jorge
e = e || window.event;
Does that look like a DOM node to you?
Ooops, of course not, I thought I had posted this version:
<script>
window.onload= function () {
document.getElementById('sublist').onclick= function (e) {
e= (e= e || window.event).target || e.srcElement;
if (e === this) {
this.style.border= this.style.border ? "" : "1px solid red";
}
e= null;
};
};
</script>
Note the lines:
e= (e= e || window.event).target || e.srcElement;
if (e === this) {
that later on I rewrote as:
if (((e= e || window.event).target || e.srcElement) === this) {
....but forgot to remove the e= null;
So, given
e= (e= e || window.event).target || e.srcElement;
should I have nulled var e before returning ?