Skip to content

Split HTMLInput #33

@flip111

Description

@flip111

https://pursuit.purescript.org/packages/purescript-dom-indexed/10.0.0/docs/DOM.HTML.Indexed#t:HTMLinput

Rather than having one input type which takes this type to set it's type https://pursuit.purescript.org/packages/purescript-dom-indexed/12.0.0/docs/DOM.HTML.Indexed.InputType#t:InputType

It would be better to have a dedicated type for each html input. So instead of HTMLInput + InputButton you get HTMLInputButton. I suggest this because right now it's possible to make combinations that are not valid. Thus we have types that are not correct by construction.

Example of invalid combination. HTMLInput has attribute onSearch https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/search_event This attribute is only valid when html input is of type search. At the moment the onSearch event is allowed by any input type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions