evancz/elm-html/3.0.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 Union Type so you can have many different kinds of events as seen in the TodoMVC example.

Focus Helpers

onBlur : Address a -> a -> Attribute
onFocus : Address a -> a -> Attribute
onSubmit : Address a -> a -> Attribute

Keyboard Helpers

onKeyUp : Address a -> (Int -> a) -> Attribute
onKeyDown : Address a -> (Int -> a) -> Attribute
onKeyPress : Address a -> (Int -> a) -> Attribute

Mouse Helpers

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

All Events

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