evancz/elm-html/1.1.0

NOTE: this package moved to elm/html

NOTE: this package is not compatible with Elm 0.19.1

Html.Events

It is often helpful to create an ADT so you can have many different kinds of events as seen in the TodoMVC example.

All Events

on : String -> Decoder a -> (a -> Message) -> Attribute
targetValue : Decoder String
targetChecked : Decoder Bool
keyCode : Decoder Int

Focus Helpers

onBlur : Message -> Attribute
onFocus : Message -> Attribute
onSubmit : Message -> Attribute

Keyboard Helpers

onKeyUp : (Int -> Message) -> Attribute
onKeyDown : (Int -> Message) -> Attribute
onKeyPress : (Int -> Message) -> Attribute

Mouse Helpers

onClick : Message -> Attribute
onDoubleClick : Message -> Attribute
onMouseMove : Message -> Attribute
onMouseDown : Message -> Attribute
onMouseUp : Message -> Attribute
onMouseEnter : Message -> Attribute
onMouseLeave : Message -> Attribute
onMouseOver : Message -> Attribute
onMouseOut : Message -> Attribute