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
- newtype AllowDrop = AllowDrop Bool
- data Options = Options {}
- defaultOptions :: Options
- defaultEvents :: Events
- keyboardEvents :: Events
- mouseEvents :: Events
- dragEvents :: Events
- pointerEvents :: Events
- audioVideoEvents :: Events
Types
Capture
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 | |
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 |
DropEvent
Related to using drop-related events
Options
Options for handling event propagation.
Constructors
Options | |
Fields |
Instances
Generic Options Source # | |||||
Defined in Miso.Event.Types Associated Types
| |||||
Show Options Source # | |||||
Eq Options Source # | |||||
ToJSVal Options Source # | |||||
type Rep Options Source # | |||||
Defined in Miso.Event.Types type Rep Options = D1 ('MetaData "Options" "Miso.Event.Types" "miso-1.9.0.0-inplace" 'False) (C1 ('MetaCons "Options" 'PrefixI 'True) (S1 ('MetaSel ('Just "preventDefault") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "stopPropagation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) |
defaultOptions :: Options Source #
Default value for Options
.
defaultOptions = Options { preventDefault = False, stopPropagation = False }
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
audioVideoEvents :: Events Source #
Audio video events For use with the <audio> and <video> tags.