Skip to content

docs: Change property to attribute #1198

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

Merged
merged 1 commit into from
Aug 24, 2021
Merged

Conversation

Yukon123
Copy link

Description of Problem

It's' attribute rather than property .

Proposed Solution

Change property to attribute

Additional Information

This correction will make the docs more precise and easier to understand

I try attribute with 'foo', the result is just like the expect.

@NataliaTepluhina
Copy link
Member

@Yukon123 could you please explain why do you think it will be more precise? Binding on the element can be a property or an attribute, so I am not sure I understand why do we need to make this change.

@Yukon123
Copy link
Author

The MDN define attribute like https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes

Elements in HTML have attributes; these are additional values that configure the elements or adjust their behavior in various ways to meet the criteria the users want.

Attribute are additional values to meet the criteria the users want.What we bind manually is called attribute

Stack Overflow has a similar view :https://stackoverflow.com/questions/6003819/what-is-the-difference-between-properties-and-attributes-in-html/6004028#6004028

When writing HTML source code, you can define attributes on your HTML elements. Then, once the browser parses your code, a corresponding DOM node will be created. This node is an object, and therefore it has properties.

It's called binding attribute on element rather than binding property? Isn't it?

Copy link
Member

@NataliaTepluhina NataliaTepluhina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yukon123 thank you for the additional explanation! I agree with your arguments, let's change this to attribute

@NataliaTepluhina NataliaTepluhina merged commit 042a0be into vuejs:master Aug 24, 2021
@Yukon123 Yukon123 deleted the patch-11 branch August 24, 2021 13:50
@Yukon123 Yukon123 changed the title Change property to attribute docs: Change property to attribute Aug 25, 2021
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

Successfully merging this pull request may close these issues.

2 participants