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

Our attribute vs property resolution algorithm should be documented #2345

Closed
dead-claudia opened this issue Dec 20, 2018 · 1 comment
Closed
Labels
Area: Documentation For anything dealing mainly with the documentation itself Type: Bug For bugs and any other unexpected breakage

Comments

@dead-claudia
Copy link
Member

Currently, there's no mention in the relevant documentation about how we tell attributes and properties apart. It's pretty simple to explain: if prop in vnode.dom, it's treated as a property, and if not, it's treated as an attribute. This is a pretty simple thing to add, and it could probably be done within an hour if that.

We do need to mention that in the case of ill-behaved custom elements where identically-named properties and attributes exist, you should use oncreate/onupdate to update it if Mithril does the wrong thing (like if you need to update the attribute and not the property).

/cc @barneycarroll @porsager

@dead-claudia dead-claudia added Type: Bug For bugs and any other unexpected breakage Area: Documentation For anything dealing mainly with the documentation itself labels Dec 20, 2018
@dead-claudia dead-claudia changed the title Our resolution algorithm should be documented Our attribute resolution algorithm should be documented Jan 10, 2019
@dead-claudia dead-claudia changed the title Our attribute resolution algorithm should be documented Our attribute vs property resolution algorithm should be documented Jan 10, 2019
@dead-claudia
Copy link
Member Author

Forgot to closed - it's fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Documentation For anything dealing mainly with the documentation itself Type: Bug For bugs and any other unexpected breakage
Projects
Status: Closed
Development

No branches or pull requests

1 participant