I am reading a book about javascript and I came across this syntax
this is a function
function unwantedTextEvent(){
return (navigator.vendor == 'Apple Computer, Inc.' && (event.target == event.relatedTarget.parentNode
|| (event.eventPhase == 3 && event.target.parentNode == event.relatedTarget)));
};
and then inside another function , the author is doing just this
attachEventListener(li, 'mouseover', function(e){
if (unwantedTextEvent()) { return; }
clearTimeout(closetime);
if (branch == li) { branch = null; }
//and so on
Now, I am ashamed to admit that I have never seen that syntax again :
if (unwantedTextEvent()) { return; }
and I dont have a clue what it does. Can anybody please explain to me? What does this syntax does in general?
Thanks in advance