miso
Copyright(C) 2016-2026 David M. Johnson
LicenseBSD3-style (see the file LICENSE)
MaintainerDavid M. Johnson <code@dmj.io>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Miso.Native.X.Element.Input.Method

Contents

Description

 
Synopsis

Methods

focus :: MisoString -> action -> (MisoString -> action) -> Effect context props model action Source #

https://lynxjs.org/api/elements/built-in/input.html#focus

Requests focus for the selected <input>.

focus "#myInput" Focused FocusFailed

blur :: MisoString -> action -> (MisoString -> action) -> Effect context props model action Source #

https://lynxjs.org/api/elements/built-in/input.html#blur

Releases focus for the selected <input>.

blur "#myInput" Blurred BlurFailed

setValue :: MisoString -> MisoString -> action -> (MisoString -> action) -> Effect context props model action Source #

https://lynxjs.org/api/elements/built-in/input.html#setvalue

Sets the input content of the selected <input>.

setValue "#myInput" "hello" ValueSet ValueSetFailed

setSelectionRange :: MisoString -> Int -> Int -> action -> (MisoString -> action) -> Effect context props model action Source #

https://lynxjs.org/api/elements/built-in/input.html#setselectionrange

Sets the selection range of the selected <input>.

setSelectionRange "#myInput" 0 3 RangeSet RangeSetFailed

getValue :: MisoString -> (InputValue -> action) -> (MisoString -> action) -> Effect context props model action Source #

https://lynxjs.org/api/elements/built-in/input.html#getvalue

Retrieves the current value (and selection) of the selected <input>.

getValue "#myInput" GotValue GetValueFailed

Types

data InputValue Source #

Result of calling getValue.

Constructors

InputValue 

Fields