Module
DOM.Classy.Event.EventTarget
- Package
- purescript-dom-classy
- Repository
- garyb/purescript-dom-classy
#EventTarget Source
class EventTarget t where
A class for subtypes of EventTarget
.
Members
toEventTarget :: t -> EventTarget
Instances
EventTarget Node
EventTarget Document
EventTarget Element
EventTarget CharacterData
EventTarget Text
EventTarget Comment
EventTarget ProcessingInstruction
EventTarget DocumentFragment
EventTarget DocumentType
EventTarget Window
EventTarget HTMLDocument
EventTarget HTMLElement
EventTarget HTMLHtmlElement
EventTarget HTMLHeadElement
EventTarget HTMLTitleElement
EventTarget HTMLBaseElement
EventTarget HTMLLinkElement
EventTarget HTMLMetaElement
EventTarget HTMLStyleElement
EventTarget HTMLBodyElement
EventTarget HTMLHeadingElement
EventTarget HTMLParagraphElement
EventTarget HTMLHRElement
EventTarget HTMLPreElement
EventTarget HTMLQuoteElement
EventTarget HTMLOListElement
EventTarget HTMLUListElement
EventTarget HTMLLIElement
EventTarget HTMLDListElement
EventTarget HTMLDivElement
EventTarget HTMLAnchorElement
EventTarget HTMLDataElement
EventTarget HTMLTimeElement
EventTarget HTMLSpanElement
EventTarget HTMLBRElement
EventTarget HTMLModElement
EventTarget HTMLImageElement
EventTarget HTMLIFrameElement
EventTarget HTMLEmbedElement
EventTarget HTMLObjectElement
EventTarget HTMLParamElement
EventTarget HTMLMediaElement
EventTarget HTMLAudioElement
EventTarget HTMLVideoElement
EventTarget HTMLSourceElement
EventTarget HTMLTrackElement
EventTarget HTMLMapElement
EventTarget HTMLAreaElement
EventTarget HTMLTableElement
EventTarget HTMLTableCaptionElement
EventTarget HTMLTableColElement
EventTarget HTMLTableSectionElement
EventTarget HTMLTableRowElement
EventTarget HTMLTableCellElement
EventTarget HTMLTableDataCellElement
EventTarget HTMLTableHeaderCellElement
EventTarget HTMLFormElement
EventTarget HTMLLabelElement
EventTarget HTMLInputElement
EventTarget HTMLButtonElement
EventTarget HTMLSelectElement
EventTarget HTMLDataListElement
EventTarget HTMLOptGroupElement
EventTarget HTMLOptionElement
EventTarget HTMLTextAreaElement
EventTarget HTMLKeygenElement
EventTarget HTMLOutputElement
EventTarget HTMLProgressElement
EventTarget HTMLMeterElement
EventTarget HTMLFieldSetElement
EventTarget HTMLLegendElement
EventTarget HTMLScriptElement
EventTarget HTMLTemplateElement
EventTarget HTMLCanvasElement
#eventListener Source
eventListener :: forall a eff event. IsEvent event => (event -> Eff eff a) -> EventListener eff
Creates an event listener from a normal Eff
-based callback function,
automatically converting to an event subtype. If the conversion fails due
to a received event not matching the expected type it will be ignored.
#addEventListener Source
addEventListener :: forall eff t. EventTarget t => EventType -> EventListener (dom :: DOM | eff) -> Boolean -> t -> Eff (dom :: DOM | eff) Unit
Adds a listener to an event target. The boolean argument indicates whether the listener should be added for the "capture" phase.
#removeEventListener Source
removeEventListener :: forall eff t. EventTarget t => EventType -> EventListener (dom :: DOM | eff) -> Boolean -> t -> Eff (dom :: DOM | eff) Unit
Removes a listener to an event target. The boolean argument indicates whether the listener should be removed for the "capture" phase.
#dispatchEvent Source
dispatchEvent :: forall eff event t. EventTarget t => IsEvent event => event -> t -> Eff (dom :: DOM, err :: EXCEPTION | eff) Boolean
Dispatches an event from an event target.
Re-exports from DOM.Event.EventTarget
#EventListener
data EventListener :: Row Effect -> Type
A boxed function that can be used as an event listener. This is necessary due to the underlying implementation of Eff functions.