(function(global) {
if (!('Event'inglobal)) returnfalse;
if (typeofglobal.Event === 'function') returntrue;
try {
// In IE 9 and 10, the Event object exists but cannot be instantiatednewEvent('click');
returntrue;
} catch(e) {
returnfalse;
}
}(this))