Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Parse webforms out of webpages
Synopsis
- data Form = Form {}
- data Input = Input {
- label :: Text
- description :: Node
- inputType :: Text
- dirname :: Text
- inputName :: Text
- value :: Text
- inputAutocomplete :: Text
- autofocus :: Bool
- checked :: Bool
- disabled :: Bool
- readonly :: Bool
- multiple :: Bool
- formAction :: Maybe URI
- formEnctype :: Maybe Text
- formMethod :: Maybe Text
- formValidate :: Bool
- formTarget :: Maybe Text
- inputMode :: Text
- list :: [OptionGroup]
- range :: (Maybe Text, Maybe Text)
- step :: Maybe Text
- lengthRange :: (Maybe Int, Maybe Int)
- pattern :: Maybe Regex
- required :: Bool
- placeholder :: Text
- title :: Text
- size :: Maybe Int
- fileData :: FileSelector
- imageData :: ImageData
- textArea :: TextArea
- data OptionGroup = OptGroup {}
- data Option = Option {
- optLabel :: Text
- optValue :: Text
- optSelected :: Bool
- optDisabled :: Bool
- data FileSelector = FileSelector {
- fileAccept :: [Text]
- fileCapture :: Text
- defaultFileData :: FileSelector
- data ImageData = ImageData {}
- defaultImageData :: ImageData
- data TextArea = TextArea {}
- defaultTextArea :: TextArea
- parseElement :: Cursor -> Maybe Form
- parseElement' :: Text -> Cursor -> Maybe Form
- parseDocument :: Document -> Text -> Maybe Form
- parseDocument' :: Text -> Document -> Text -> Maybe Form
- ensureButtons :: Form -> Form
Documentation
A collection of controls intended to be handle by a particular URL endpoint.
Form | |
|
Individual piece of data to send to a webservice.
Input | |
|
data OptionGroup Source #
A labelled-group of options, that can be collectively disabled.
A possible value for an input.
Option | |
|
data FileSelector Source #
Data specific to "file" inputs.
FileSelector | |
|
defaultFileData :: FileSelector Source #
Empty values for file data.
Data specific to "image" inputs.
defaultImageData :: ImageData Source #
Empty values for image data.
Data specific to textarea inputs.
defaultTextArea :: TextArea Source #
Empty values for textarea data.
parseDocument :: Document -> Text -> Maybe Form Source #
Parse a named or numerically-indexed form from an HTML document.
ensureButtons :: Form -> Form Source #
Add submit & reset buttons to a form if they were missing!