# class EventTarget

#### package js.html

#### extended by AudioContext, AudioNode, Database, FileHandle, MutableFile, Request, Transaction, DataChannel, PeerConnection, Animation, ApplicationCache, AudioTrackList, BatteryManager, DOMCursor, DOMRequest, DesktopNotification, EventSource, FileReader, FontFaceSet, ImageCapture, MediaRecorder, MediaSource, MediaStream, MediaStreamTrack, MessagePort, Node, PermissionStatus, Screen, ScreenOrientation, ServiceWorker, ServiceWorkerRegistration, SharedWorker, SourceBuffer, SourceBufferList, SpeechRecognition, SpeechSynthesisUtterance, TextTrack, TextTrackCue, TextTrackList, VideoTrackList, WebSocket, Window, Worker, WorkerGlobalScope, XMLHttpRequestEventTarget

Available on HTML5

`EventTarget` is an interface implemented by objects that can receive events and may have listeners for them.

Documentation EventTarget by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

https://developer.mozilla.org/en-US/docs/Web/API/EventTarget

### Methods

###

`addEventListener (type:String, listener:Function, capture:Bool = false):Void`

`addEventListener (type:String, listener:EventListener, capture:Bool = false, ?wantsUntrusted:Bool):Void`

Throws:

`null` | DOMError

###

`dispatchEvent (event:Event):Bool`

Throws:

`null` | DOMError

###

`removeEventListener (type:String, listener:Function, capture:Bool = false):Void`

`removeEventListener (type:String, listener:EventListener, capture:Bool = false):Void`

Throws:

`null` | DOMError