-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
fix(runtime-dom): set text
as an attribute for a
tags
#12212
base: main
Are you sure you want to change the base?
Conversation
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-sfc
@vue/compiler-ssr
@vue/runtime-dom
@vue/runtime-core
@vue/reactivity
@vue/server-renderer
@vue/shared
@vue/compat
vue
@vue/compiler-dom
commit: |
// #12211 <a text> must be set as attribute | ||
if (key === 'text' && el.tagName === 'A') { | ||
return false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<a>
element doesn't have a text
attribute while HTMLAnchorElement
has a text
property. Not sure if we should add this or should let users to use ^text="..."
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this detail, thanks for pointing it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not saying we shouldn't add this 😅
I just want to first discuss the criteria we use to handle such situations and whether we should first check if other frameworks have any special handling. I think we can keep this open for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems almost all major frameworks directly renders text
as an attribute. So I suppose it's fine for us to align with this behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine
close #12211