DOM.Simple.Event
- Package
- purescript-dom-simple
- Repository
- garganscript/purescript-dom-simple
#IsEvent Source
class IsEvent :: forall k. k -> Constraint
class IsEvent e
Instances
IsEvent Event
IsEvent AnimationEvent
IsEvent ClipboardEvent
IsEvent CompositionEvent
IsEvent DragEvent
IsEvent FocusEvent
IsEvent HashChangeEvent
IsEvent ImageEvent
IsEvent KeyboardEvent
IsEvent MediaEvent
IsEvent MessageEvent
IsEvent MouseEvent
IsEvent MouseButtonEvent
IsEvent PageTransitionEvent
IsEvent PointerEvent
IsEvent PopStateEvent
IsEvent ProgressEvent
IsEvent SelectionEvent
IsEvent StorageEvent
IsEvent ToggleEvent
IsEvent TouchEvent
IsEvent TransitionEvent
IsEvent UIEvent
IsEvent WheelEvent
#InputEvent Source
data InputEvent
#MouseButtonEvent Source
#UpdateEvent Source
data UpdateEvent
#IsMouseEvent Source
class IsMouseEvent :: forall k. k -> Constraint
class (IsEvent e) <= IsMouseEvent e
Instances
#Events Source
data Events
Constructors
Basic Event
Animation AnimationEvent
Clipboard ClipboardEvent
Composition CompositionEvent
Drag DragEvent
Focus FocusEvent
HashChange HashChangeEvent
Image ImageEvent
Keyboard KeyboardEvent
Media MediaEvent
Message MessageEvent
Mouse MouseEvent
MouseButton MouseButtonEvent
PageTransition PageTransitionEvent
Pointer PointerEvent
PopState PopStateEvent
Progress ProgressEvent
Selection SelectionEvent
Storage StorageEvent
Toggle ToggleEvent
Touch TouchEvent
Transition TransitionEvent
UI UIEvent
Wheel WheelEvent
#animationEvent Source
animationEvent :: forall a. a
#clipboardEvent Source
clipboardEvent :: forall a. a
#compositionEvent Source
compositionEvent :: 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
#wheelEvent Source
wheelEvent :: forall a. a
#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
#cancelable Source
cancelable :: forall e. IsEvent e => e -> Boolean
Whether the event is cancelable
#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
#currentTarget Source
currentTarget :: forall e. IsEvent e => e -> Element
Returns the Element
the event is currently bubbling through
#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 -> Constraint
class (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)
#key Source
key :: KeyboardEvent -> String
Returns a string describing the key List: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values
#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
#buttons Source
buttons :: MouseEvent -> Number
#clientX Source
clientX :: MouseEvent -> Number
#clientY Source
clientY :: MouseEvent -> Number
#movementX Source
movementX :: MouseEvent -> Number
#movementY Source
movementY :: MouseEvent -> Number
#offsetX Source
offsetX :: MouseEvent -> Number
#offsetY Source
offsetY :: MouseEvent -> Number
#pageX Source
pageX :: MouseEvent -> Number
#pageY Source
pageY :: MouseEvent -> Number
#screenX Source
screenX :: MouseEvent -> Number
#screenY Source
screenY :: MouseEvent -> Number
#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