Module

DOM.Simple.Event

Package
purescript-dom-simple
Repository
garganscript/purescript-dom-simple

#Event Source

data Event

Instances

#AnimationEvent Source

#ClipboardEvent Source

#CompositionEvent Source

#DragEvent Source

#FocusEvent Source

#HashChangeEvent Source

#ImageEvent Source

#InputEvent Source

#MediaEvent Source

#MessageEvent Source

#MouseButtonEvent Source

data MouseButtonEvent

A MouseEvent where the button property can be trusted

Instances

#PageTransitionEvent Source

#PopStateEvent Source

#ProgressEvent Source

#SelectionEvent Source

#StorageEvent Source

#ToggleEvent Source

#TransitionEvent Source

#UIEvent Source

data UIEvent

Instances

#UpdateEvent Source

#WheelEvent Source

#event Source

event :: forall a. a

#animationEvent Source

animationEvent :: forall a. a

#clipboardEvent Source

clipboardEvent :: forall a. a

#compositionEvent Source

compositionEvent :: forall a. a

#dragEvent Source

dragEvent :: forall a. a

#hashChangeEvent Source

hashChangeEvent :: forall a. a

#historyEvent Source

historyEvent :: forall a. a

#imageEvent Source

imageEvent :: forall a. a

#focusEvent Source

focusEvent :: forall a. a

#keyboardEvent Source

keyboardEvent :: forall a. a

#mediaEvent Source

mediaEvent :: forall a. a

#mouseEvent Source

mouseEvent :: forall a. a

#pageTransitionEvent Source

pageTransitionEvent :: forall a. a

#pointerEvent Source

pointerEvent :: forall a. a

#popStateEvent Source

popStateEvent :: forall a. a

#progressEvent Source

progressEvent :: forall a. a

#selectionEvent Source

selectionEvent :: forall a. a

#storageEvent Source

storageEvent :: forall a. a

#toggleEvent Source

toggleEvent :: forall a. a

#touchEvent Source

touchEvent :: forall a. a

#transitionEvent Source

transitionEvent :: forall a. a

#uiEvent Source

uiEvent :: forall a. a

#wheelEvent Source

wheelEvent :: forall a. a

#downcast Source

downcast :: forall ctor from to. ctor -> from -> Maybe to

Attempt to cast to a type given a constructor for it

#subclass Source

subclass :: forall e. IsEvent e => e -> Maybe Events

Looks up the type of an Event and attempts to match it against a known list, cast it to the relevant subclass and return as an ADT type for matching. Reference: https://developer.mozilla.org/en-US/docs/Web/Events

#bubbles Source

bubbles :: forall e. IsEvent e => e -> Boolean

Whether the event bubbles

#cancelable Source

cancelable :: forall e. IsEvent e => e -> Boolean

Whether the event is cancelable

#composed Source

composed :: forall e. IsEvent e => e -> Boolean

Whether the event is a composed event (shadow DOM)

#trusted Source

trusted :: forall e. IsEvent e => e -> Boolean

Whether the event is browser-generated

#defaultPrevented Source

defaultPrevented :: forall e. IsEvent e => e -> Boolean

Whether the default action has been prevented

#propagationStopped Source

propagationStopped :: forall e. IsEvent e => e -> Effect Unit

Whether propagation has been stopped

#eventPhase Source

eventPhase :: forall e. IsEvent e => e -> EventPhase

The phase the event is currently in

#timestamp Source

timestamp :: forall e. IsEvent e => e -> Number

When the event was generated

#type' Source

type' :: forall e. IsEvent e => e -> String

A string descriptor of the event name (lowercase, no on)

#target Source

target :: forall e. IsEvent e => e -> Element

Returns the Element the event was dispatched against

#currentTarget Source

currentTarget :: forall e. IsEvent e => e -> Element

Returns the Element the event is currently bubbling through

#relatedTarget Source

relatedTarget :: forall e. IsEvent e => e -> Maybe Element

For drag and drop and such, a related Element

#stopPropagation Source

stopPropagation :: forall e. IsEvent e => e -> Effect Unit

Stops propagation of the event

#stopImmediatePropagation Source

stopImmediatePropagation :: forall e. IsEvent e => e -> Effect Unit

Stops immediate propagation of the event

#preventDefault Source

preventDefault :: forall e. IsEvent e => e -> Effect Unit

Prevents the default action from being executed after propagation

#HasModifierKeys Source

class HasModifierKeys :: forall k. k -> Constraintclass (IsEvent e) <= HasModifierKeys e 

Events with information about modifier keys (Mouse, Keyboard, Touch)

Instances

#altKey Source

altKey :: forall e. HasModifierKeys e => e -> Boolean

Was the alt key held down?

#ctrlKey Source

ctrlKey :: forall e. HasModifierKeys e => e -> Boolean

Was the ctrl key held down?

#shiftKey Source

shiftKey :: forall e. HasModifierKeys e => e -> Boolean

Was the shift key held down?

#metaKey Source

metaKey :: forall e. HasModifierKeys e => e -> Boolean

Was the meta key held down?

#getModifierState Source

getModifierState :: forall e. HasModifierKeys e => e -> ModifierKey -> Boolean

Returns whether the given ModifierKey was pressed

#composing Source

composing :: KeyboardEvent -> Boolean

Returns whether the event is composing (shadow dom)

#locale Source

locale :: KeyboardEvent -> String

The locale string of the user's keyboard at present, which may or may not be the locale of the data

#location Source

location :: KeyboardEvent -> Number

An index of the key on the input device

#repeat Source

repeat :: KeyboardEvent -> Boolean

Returns whether this event was generated while the key was held down

#button Source

button :: MouseButtonEvent -> Int

Which button was pressed to trigger the event Reference: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button