| Copyright | (C) 2016-2026 David M. Johnson |
|---|---|
| License | BSD3-style (see the file LICENSE) |
| Maintainer | David M. Johnson <code@dmj.io> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Miso.Native.X.Element.Textarea.Event
Description
Synopsis
- onBlur :: (MisoString -> action) -> Attribute model action
- onBlurWith :: (MisoString -> DOMRef -> action) -> Attribute model action
- onBlurMain :: (MisoString -> action) -> EventHandler model action
- onBlurMainWith :: (MisoString -> model -> DOMRef -> action) -> EventHandler model action
- onConfirm :: (MisoString -> action) -> Attribute model action
- onConfirmWith :: (MisoString -> DOMRef -> action) -> Attribute model action
- onConfirmMain :: (MisoString -> action) -> EventHandler model action
- onConfirmMainWith :: (MisoString -> model -> DOMRef -> action) -> EventHandler model action
- onFocus :: (MisoString -> action) -> Attribute model action
- onFocusWith :: (MisoString -> DOMRef -> action) -> Attribute model action
- onFocusMain :: (MisoString -> action) -> EventHandler model action
- onFocusMainWith :: (MisoString -> model -> DOMRef -> action) -> EventHandler model action
- onInput :: (TextareaEvent -> action) -> Attribute model action
- onInputWith :: (TextareaEvent -> DOMRef -> action) -> Attribute model action
- onInputMain :: (TextareaEvent -> action) -> EventHandler model action
- onInputMainWith :: (TextareaEvent -> model -> DOMRef -> action) -> EventHandler model action
- onSelection :: (SelectionEvent -> action) -> Attribute model action
- onSelectionWith :: (SelectionEvent -> DOMRef -> action) -> Attribute model action
- onSelectionMain :: (SelectionEvent -> action) -> EventHandler model action
- onSelectionMainWith :: (SelectionEvent -> model -> DOMRef -> action) -> EventHandler model action
- data TextareaEvent = TextareaEvent {}
- data SelectionEvent = SelectionEvent {}
- textareaValueDecoder :: Decoder MisoString
- textareaDecoder :: Decoder TextareaEvent
- selectionDecoder :: Decoder SelectionEvent
- textareaEvents :: Events
Events
onBlur :: (MisoString -> action) -> Attribute model action Source #
https://lynxjs.org/api/elements/built-in/textarea.html#bindblur
Triggered when the textarea is blurred, outputting the current value.
onBlurWith :: (MisoString -> DOMRef -> action) -> Attribute model action Source #
onBlurMain :: (MisoString -> action) -> EventHandler model action Source #
https://lynxjs.org/api/elements/built-in/textarea.html#bindblur
Triggered when the textarea is blurred, outputting the current value.
Called on main thread, provides read-only access to model. Meant to be used with '-XStaticPointers'.
data Action = CurrentValue MisoString
view_ [ event (static (onBlurMain CurrentValue)) ] [ "some view" ]
onBlurMainWith :: (MisoString -> model -> DOMRef -> action) -> EventHandler model action Source #
https://lynxjs.org/api/elements/built-in/textarea.html#bindblur
Triggered when the textarea is blurred, outputting the current value.
Called on main thread, provides read-only access to model. Meant to be used with '-XStaticPointers'.
data Action = CurrentValue MisoString Model DOMRef view_ [ event (static (onBlurMain CurrentValue)) ] [ "some view" ]
onConfirm :: (MisoString -> action) -> Attribute model action Source #
https://lynxjs.org/api/elements/built-in/textarea.html#bindconfirm
Triggered when the confirm button is clicked (only when confirm-type is
defined), outputting the current value.
onConfirmWith :: (MisoString -> DOMRef -> action) -> Attribute model action Source #
onConfirmMain :: (MisoString -> action) -> EventHandler model action Source #
https://lynxjs.org/api/elements/built-in/textarea.html#bindconfirm
Triggered when the confirm button is clicked (only when confirm-type is
defined), outputting the current value.
onConfirmMainWith :: (MisoString -> model -> DOMRef -> action) -> EventHandler model action Source #
https://lynxjs.org/api/elements/built-in/textarea.html#bindconfirm
Triggered when the confirm button is clicked (only when confirm-type is
defined), outputting the current value.
onFocus :: (MisoString -> action) -> Attribute model action Source #
https://lynxjs.org/api/elements/built-in/textarea.html#bindfocus
Triggered when the textarea is focused, outputting the current value.
onFocusWith :: (MisoString -> DOMRef -> action) -> Attribute model action Source #
onFocusMain :: (MisoString -> action) -> EventHandler model action Source #
Like onFocus, but dispatched on the Lynx main thread (MTS).
Runs imperatively on the MTS (no VDOM diff). Meant to be used with
-XStaticPointers.
data Action = Focused MisoString view_ [ event (static (onFocusMain Focused)) ] [ "some view" ]
onFocusMainWith :: (MisoString -> model -> DOMRef -> action) -> EventHandler model action Source #
Like onFocusMain, but the handler also receives read-only access to the
model and the target element's DOMRef (for imperative MTS mutation).
data Action = Focused MisoString Model DOMRef view_ [ event (static (onFocusMainWith Focused)) ] [ "some view" ]
onInput :: (TextareaEvent -> action) -> Attribute model action Source #
https://lynxjs.org/api/elements/built-in/textarea.html#bindinput
Triggered when the textarea content changes.
onInputWith :: (TextareaEvent -> DOMRef -> action) -> Attribute model action Source #
onInputMain :: (TextareaEvent -> action) -> EventHandler model action Source #
Like onInput, but dispatched on the Lynx main thread (MTS).
Runs imperatively on the MTS (no VDOM diff). Meant to be used with
-XStaticPointers.
data Action = Changed TextareaEvent view_ [ event (static (onInputMain Changed)) ] [ "some view" ]
onInputMainWith :: (TextareaEvent -> model -> DOMRef -> action) -> EventHandler model action Source #
Like onInputMain, but the handler also receives read-only access to the
model and the target element's DOMRef (for imperative MTS mutation).
data Action = Changed TextareaEvent Model DOMRef view_ [ event (static (onInputMainWith Changed)) ] [ "some view" ]
onSelection :: (SelectionEvent -> action) -> Attribute model action Source #
https://lynxjs.org/api/elements/built-in/textarea.html#bindselection
Triggered when the textarea selection changes.
onSelectionWith :: (SelectionEvent -> DOMRef -> action) -> Attribute model action Source #
Like onSelection, but the handler also receives the target element's DOMRef.
Use for main-thread (MTS) handlers that imperatively mutate the element.
onSelectionMain :: (SelectionEvent -> action) -> EventHandler model action Source #
Like onSelection, but dispatched on the Lynx main thread (MTS).
Runs imperatively on the MTS (no VDOM diff). Meant to be used with
-XStaticPointers.
data Action = Selected SelectionEvent view_ [ event (static (onSelectionMain Selected)) ] [ "some view" ]
onSelectionMainWith :: (SelectionEvent -> model -> DOMRef -> action) -> EventHandler model action Source #
Like onSelectionMain, but the handler also receives read-only access to
the model and the target element's DOMRef (for imperative MTS mutation).
data Action = Selected SelectionEvent Model DOMRef view_ [ event (static (onSelectionMainWith Selected)) ] [ "some view" ]
Types
data TextareaEvent Source #
Payload of the bindinput event.
Constructors
| TextareaEvent | |
Fields
| |
Instances
| Show TextareaEvent Source # | |
Defined in Miso.Native.X.Element.Textarea.Event Methods showsPrec :: Int -> TextareaEvent -> ShowS # show :: TextareaEvent -> String # showList :: [TextareaEvent] -> ShowS # | |
| Eq TextareaEvent Source # | |
Defined in Miso.Native.X.Element.Textarea.Event Methods (==) :: TextareaEvent -> TextareaEvent -> Bool # (/=) :: TextareaEvent -> TextareaEvent -> Bool # | |
data SelectionEvent Source #
Payload of the bindselection event.
Constructors
| SelectionEvent | |
Instances
| Show SelectionEvent Source # | |
Defined in Miso.Native.X.Element.Textarea.Event Methods showsPrec :: Int -> SelectionEvent -> ShowS # show :: SelectionEvent -> String # showList :: [SelectionEvent] -> ShowS # | |
| Eq SelectionEvent Source # | |
Defined in Miso.Native.X.Element.Textarea.Event Methods (==) :: SelectionEvent -> SelectionEvent -> Bool # (/=) :: SelectionEvent -> SelectionEvent -> Bool # | |
Decoders
textareaValueDecoder :: Decoder MisoString Source #
Decodes the value field shared by bindblur, bindconfirm and bindfocus.