var Event=require("./event"),EventTarget={onopen:null,onmessage:null,onerror:null,onclose:null,addEventListener:function(e,t,n){this.on(e,t)},removeEventListener:function(e,t,n){this.removeListener(e,t)},dispatchEvent:function(e){e.target=e.currentTarget=this,e.eventPhase=Event.AT_TARGET,this["on"+e.type]&&this["on"+e.type](e),this.emit(e.type,e)}};module.exports=EventTarget;