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

[0.8] camel-case attributes do not deserialize to properties correctly. #1257

Closed
sorvell opened this issue Mar 5, 2015 · 5 comments
Closed
Assignees
Labels

Comments

@sorvell
Copy link
Contributor

sorvell commented Mar 5, 2015

<x-thing camel-case="foo">

should result in

xThing.camelCase === 'foo'
@sorvell
Copy link
Contributor Author

sorvell commented Mar 5, 2015

Related to #1226

@ssorallen
Copy link
Contributor

Except for data- attributes probably, otherwise they are not set on the element's dataset. Or would you have to suffix those with a $?

@kevinpschaaf
Copy link
Member

This issue only relates to the attribute deserialization feature of Polymer, which only operates on attributes matching property names defined in properties with a type field set.

Per current rules, data-foo would only be deserialized by Polymer if there was a dataFoo property defined. The fact that data-foo also deserializes to dataset.foo is a feature of the DOM, not Polymer, and that will happen regardless.

@kevinpschaaf
Copy link
Member

Fixed in 618756b.

@ssorallen
Copy link
Contributor

👍 It looks like this addresses #1226 as well since className (which converts from "class-name") is a property of HTMLElement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants