-
-
Notifications
You must be signed in to change notification settings - Fork 156
Add support to naked attributes #768
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
Comments
Could you post the failing code? |
Hi, sure. This is the piece of code causing the issue: component TestComp {
fun render {
<div class="fi">
<textarea id="mv" readonly></textarea>
</div>
}
} or component TestComp {
fun render {
<div class="fi">
<textarea id="mv" readonly="true"></textarea>
</div>
}
} |
Hi 👋 In Mint, there are three HTML attributes which take a component Main {
fun render : Html {
<textarea id="mv" readonly={true}></textarea>
}
} They set the associated property on the HTML element, so there is no need to fall back to JavaScript for this. Not having naked attributes is intentional to avoid ambiguity in some cases and to keep the language simpler. |
Cool, thanks for the clarification! |
Support to naked attributes would prevents issues like the following:
When I tried to explicitly set the value I got the following:
This would be a nice feature to avoid the usage of JavaScript to set the property.
The text was updated successfully, but these errors were encountered: