Module

Elmish.HTML.Events.Methods

Package
purescript-elmish-html
Repository
collegevine/purescript-elmish-html

#IsKeyboardOrMouseEvent Source

class IsKeyboardOrMouseEvent (e :: Type) 

Just a marker typeclass used to mark event types that have keyboard-like properties, such as KeyboardEvent or MouseEvent.

#IsSyntheticEvent Source

class IsSyntheticEvent (e :: Type) 

Just a marker typeclass used to mark a type used as wrapper of a React event.

#getModifierState Source

getModifierState :: forall e. IsKeyboardOrMouseEvent e => String -> e -> Boolean

Returns the state of a given modifier key during an event, as defined in https://reactjs.org/docs/events.html#keyboard-events

This function applies only to certain kinds of events, such as MouseEvent or KeyboardEvent.

#preventDefault Source

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

Prevents the default handling of the event by the browser. See also https://reactjs.org/docs/events.html

#stopPropagation Source

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

Prevents propagation of the event up the React DOM tree. See also https://reactjs.org/docs/events.html