(function(){
	if(!'Event' in window) return false;

	if(typeof window.Event === 'function') return true;

	var result = true;
	try{
		new Event('click');
	}catch(e){
		result = false;
	}

	return result;
}())

(function(){
	if(!'Event' in window) return false;

	if(typeof window.Event === 'function') return true;

	try{
		new Event('click');
		return true;
	}catch(e){
		return false;
	}
}());

Add missing semicolon, avoid var assignment
Add missing semicolon, avoid var assignment