| Copyright | (C) 2016-2025 David M. Johnson |
|---|---|
| License | BSD3-style (see the file LICENSE) |
| Maintainer | David M. Johnson <code@dmj.io> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Miso.Event.Types
Description
Synopsis
- type Events = Map MisoString Capture
- type Capture = Bool
- data KeyInfo = KeyInfo {}
- newtype KeyCode = KeyCode Int
- newtype Checked = Checked Bool
- data PointerEvent = PointerEvent {}
- data PointerType
- data Options = Options {}
- defaultOptions :: Options
- preventDefault :: Options
- stopPropagation :: Options
- defaultEvents :: Events
- keyboardEvents :: Events
- mouseEvents :: Events
- dragEvents :: Events
- pointerEvents :: Events
- mediaEvents :: Events
- clipboardEvents :: Events
- touchEvents :: Events
Types
Type synonym to express capture mode for browser / mobile events.
Used to determine if *capture* should be set when using addEventListener
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#capture
KeyboardEvent
Type useful for both KeyCode and additional key press information.
Constructors
| KeyInfo | |
Type used for Keyboard events.
See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode#Browser_compatibility
CheckedEvent
Type used for Checkbox events.
PointerEvent
data PointerEvent Source #
Type used for Pointer events. https://w3c.github.io/pointerevents
Constructors
| PointerEvent | |
Fields | |
Instances
| Show PointerEvent Source # | |
Defined in Miso.Event.Types Methods showsPrec :: Int -> PointerEvent -> ShowS # show :: PointerEvent -> String # showList :: [PointerEvent] -> ShowS # | |
| Eq PointerEvent Source # | |
Defined in Miso.Event.Types | |
data PointerType Source #
Instances
| FromJSON PointerType Source # | |
Defined in Miso.Event.Types Methods parseJSON :: Value -> Parser PointerType Source # parseJSONList :: Value -> Parser [PointerType] Source # | |
| Show PointerType Source # | |
Defined in Miso.Event.Types Methods showsPrec :: Int -> PointerType -> ShowS # show :: PointerType -> String # showList :: [PointerType] -> ShowS # | |
| Eq PointerType Source # | |
Defined in Miso.Event.Types | |
Options
Options for handling event propagation.
Constructors
| Options | |
Fields | |
defaultOptions :: Options Source #
Default value for Options.
defaultOptions = Options { preventDefault = False, stopPropagation = False }preventDefault :: Options Source #
Smart constructor for specifying preventDefault
Since: 1.9.0.0
stopPropagation :: Options Source #
Smart constructor for specifying stopPropagation
Since: 1.9.0.0
Events
defaultEvents :: Events Source #
Default delegated events
keyboardEvents :: Events Source #
Keyboard events
mouseEvents :: Events Source #
Mouse events
dragEvents :: Events Source #
Drag events
pointerEvents :: Events Source #
Pointer events
mediaEvents :: Events Source #
Audio video events For use with the <audio> and <video> tags.
clipboardEvents :: Events Source #
Clipboard events
touchEvents :: Events Source #
Touch events