importEventPrototypefrom'./prototype';import{ERROR_PREFIX}from'../constants';exportdefaultclassEventextendsEventPrototype{constructor(type,eventInitConfig={}){super();if(!type){thrownewTypeError(`${ERROR_PREFIX.EVENT_ERROR} 1 argument required, but only 0 present.`);}if(typeofeventInitConfig!=='object'){thrownewTypeError(`${ERROR_PREFIX.EVENT_ERROR} parameter 2 ('eventInitDict') is not an object.`);}const{bubbles,cancelable}=eventInitConfig;this.type=`${type}`;this.timeStamp=Date.now();this.target=null;this.srcElement=null;this.returnValue=true;this.isTrusted=false;this.eventPhase=0;this.defaultPrevented=false;this.currentTarget=null;this.cancelable=cancelable?Boolean(cancelable):false;this.canncelBubble=false;this.bubbles=bubbles?Boolean(bubbles):false;}}