i'm really confused about the fs function. i mean i don't understand when i should use the function parameter,function parameter.target and when this.For example this code:
e.target.addEventListener('mouseout',function handler(d)
{
var divE=d.target.parentNode.querySelector('div.preview');
divE.parentNode.removeChild(divE);
e.target.removeEventListener('mouseout',handler,false);
},false);
why is used e.target and neither e nor this?
thisis the element thataddEventListenerwas called on.e.targetis the (child) element that the event was triggered on. They may be the same, they may be different.eis an event object.