elm-community/html-extra/2.0.0

NOTE: this package is not compatible with Elm 0.19.1

Html.Events.Extra

Additional decoders for use with event handlers in html.

Event decoders

  • TODO: key
  • TODO: code
  • TODO: KeyEvent, keyEvent
charCode : Decoder (Maybe Char)

Character code for key board events. This is being deprecated, but support for DOM3 Keyboard events is not yet present in most browsers.

Typed event decoders

targetValueFloat : Decoder Float

Floating-point target value.

targetValueInt : Decoder Int

Integer target value.

targetValueMaybe : Decoder (Maybe String)

String or empty target value.

targetValueMaybeFloat : Decoder (Maybe Float)

Floating-point or empty target value.

targetValueMaybeInt : Decoder (Maybe Int)

Integer or empty target value.

targetValueFloatParse : Decoder Float

Parse a floating-point value from the input instead of using valueAsNumber. Use this with inputs that do not have a number type.

targetValueIntParse : Decoder Int

Parse an integer value from the input instead of using valueAsNumber. Use this with inputs that do not have a number type.

targetValueMaybeFloatParse : Decoder (Maybe Float)

Parse an optional floating-point value from the input instead of using valueAsNumber. Use this with inputs that do not have a number type.

targetValueMaybeIntParse : Decoder (Maybe Int)

Parse an optional integer value from the input instead of using valueAsNumber. Use this with inputs that do not have a number type.