Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split HTMLInput #33

Open
flip111 opened this issue Jan 19, 2024 · 0 comments
Open

Split HTMLInput #33

flip111 opened this issue Jan 19, 2024 · 0 comments

Comments

@flip111
Copy link

flip111 commented Jan 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant