BodyBuilder.Events

This module entirely replaces Html.Events, providing a type-safer alternative. This is designed to work with BodyBuilder. It is not compatible with Html, though.


checkEventToHtmlEvent : BodyBuilder.Events.OnCheckEvent msg a -> List.List (Html.Attribute msg)



focusEventToHtmlAttributes : msg -> List.List (Html.Attribute msg)



inputEventToHtmlEvent : ( Maybe.Maybe (a -> msg), String.String -> a ) -> List.List (Html.Attribute msg)



mouseEventsToHtmlAttributes : BodyBuilder.Events.OnMouseEventsInside msg -> List.List (Html.Attribute msg)



on : String.String -> Json.Decode.Decoder msg -> BodyBuilder.Events.OnEvent msg a -> BodyBuilder.Events.OnEvent msg a



onCustom : String.String -> Json.Decode.Decoder { message : msg, stopPropagation : Basics.Bool, preventDefault : Basics.Bool } -> BodyBuilder.Events.OnEvent msg a -> BodyBuilder.Events.OnEvent msg a



onBlur : msg -> BodyBuilder.Events.OnBlurEvent msg a -> BodyBuilder.Events.OnBlurEvent msg a



type alias OnBlurEvent msg a =

{ a | onBlurEvent : Maybe.Maybe msg }



onBlurEventToHtmlAttributes : msg -> List.List (Html.Attribute msg)



onCheck : (Basics.Bool -> msg) -> BodyBuilder.Events.OnCheckEvent msg a -> BodyBuilder.Events.OnCheckEvent msg a



type alias OnCheckEvent msg a =

{ a | onCheckEvent : Maybe.Maybe (Basics.Bool -> msg) }



onClick : msg -> Modifiers.Modifier (BodyBuilder.Events.OnMouseEvents msg a)



type alias OnColorInputEvent msg a =

BodyBuilder.Events.OnInputEvent Color.Color msg a



onDoubleClick : msg -> Modifiers.Modifier (BodyBuilder.Events.OnMouseEvents msg a)



onContextMenu : msg -> Modifiers.Modifier (BodyBuilder.Events.OnMouseEvents msg a)



type alias OnEvent msg a =

{ a | onEvent : Maybe.Maybe ( String.String, VirtualDom.Handler msg ) }



onEventToHtmlAttributes : ( String.String, VirtualDom.Handler msg ) -> List.List (Html.Attribute msg)



onFocus : msg -> BodyBuilder.Events.OnFocusEvent msg a -> BodyBuilder.Events.OnFocusEvent msg a



type alias OnFocusEvent msg a =

{ a | onFocusEvent : Maybe.Maybe msg }



onInput : (a -> msg) -> BodyBuilder.Events.OnInputEvent a msg b -> BodyBuilder.Events.OnInputEvent a msg b



type alias OnInputEvent b msg a =

{ a | onInputEvent : Maybe.Maybe (b -> msg), fromStringInput : String.String -> b }



type alias OnIntInputEvent msg a =

BodyBuilder.Events.OnInputEvent Basics.Int msg a



onMouseDown : msg -> Modifiers.Modifier (BodyBuilder.Events.OnMouseEvents msg a)



onMouseEnter : msg -> Modifiers.Modifier (BodyBuilder.Events.OnMouseEvents msg a)



type alias OnMouseEvents msg a =

{ a | onMouseEvents : Maybe.Maybe (BodyBuilder.Events.OnMouseEventsInside msg) }



type alias OnMouseEventsInside msg =

{ click : Maybe.Maybe msg, doubleClick : Maybe.Maybe msg, contextMenu : Maybe.Maybe msg, mouseDown : Maybe.Maybe msg, mouseUp : Maybe.Maybe msg, mouseEnter : Maybe.Maybe msg, mouseLeave : Maybe.Maybe msg, mouseOver : Maybe.Maybe msg, mouseOut : Maybe.Maybe msg }



onMouseLeave : msg -> Modifiers.Modifier (BodyBuilder.Events.OnMouseEvents msg a)



onMouseOut : msg -> Modifiers.Modifier (BodyBuilder.Events.OnMouseEvents msg a)



onMouseOver : msg -> Modifiers.Modifier (BodyBuilder.Events.OnMouseEvents msg a)



onMouseUp : msg -> Modifiers.Modifier (BodyBuilder.Events.OnMouseEvents msg a)



type alias OnStringInputEvent msg a =

BodyBuilder.Events.OnInputEvent String.String msg a



onSubmit : msg -> BodyBuilder.Events.OnSubmitEvent msg a -> BodyBuilder.Events.OnSubmitEvent msg a



type alias OnSubmitEvent msg a =

{ a | onSubmitEvent : Maybe.Maybe msg }



submitEventToHtmlEvent : BodyBuilder.Events.OnSubmitEvent msg a -> List.List (Html.Attribute msg)