miso-1.0.0.0: A tasty Haskell front-end framework

Copyright(C) 2016-2018 David M. Johnson
LicenseBSD3-style (see the file LICENSE)
MaintainerDavid M. Johnson <djohnson.m@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Miso.Event.Decoder

Contents

Description

 
Synopsis

Decoder

data Decoder a Source #

Decoder data type for parsing events

Constructors

Decoder 

Fields

data DecodeTarget Source #

Data type for storing the target when parsing events

Constructors

DecodeTarget [MisoString]

Decode a single object

DecodeTargets [[MisoString]]

Decode multiple objecjects

at :: [MisoString] -> (Value -> Parser a) -> Decoder a Source #

Smart constructor for building

Decoders

emptyDecoder :: Decoder () Source #

Empty decoder for use with events like "click" that do not return any meaningful values

keycodeDecoder :: Decoder KeyCode Source #

Retrieves either "keyCode", "which" or "charCode" field in Decoder

checkedDecoder :: Decoder Checked Source #

Retrieves "checked" field in Decoder

valueDecoder :: Decoder MisoString Source #

Retrieves "value" field in Decoder