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

Runtime error when assigning type_ to textarea #215

Open
alex-tan opened this issue Sep 7, 2020 · 2 comments
Open

Runtime error when assigning type_ to textarea #215

alex-tan opened this issue Sep 7, 2020 · 2 comments

Comments

@alex-tan
Copy link

alex-tan commented Sep 7, 2020

Here are two variations of the same bug:

SSCCEs:

Trying to render the invalid DOM element initially (TypeError: Attempted to assign to readonly property outputted once)
When the DOM is patched after a successful render (Click edit button: TypeError: Attempted to assign to readonly property, outputted repeatedly.)

Presumably the issue is that this is invalid html (I inadvertently kept the type_ attribute from when the textarea was an input element before), so I'm not sure whether it's beyond the scope of the package to prevent against this type of invalid HTML issue.

@JoshuaHall
Copy link

I assume you already saw the docs for type_. I agree that this probably warrants a rework of the API considering it can result in a runtime error, which is one of the main things Elm tries to prevent. I'm just not entirely sure how to do so within Elm's type system.

@alex-tan
Copy link
Author

The approach this library takes solves at least some of the potential issues.

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

2 participants