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

Consider converting attributes with dashes into to camelCased properties #193

Closed
sorvell opened this issue Jun 26, 2013 · 4 comments
Closed

Comments

@sorvell
Copy link
Contributor

sorvell commented Jun 26, 2013

If an attribute is setup for a custom element that has a dash ('-') in it, it's reflected to a property with the same name. This makes referencing the value cumbersome since this['..'] notation must be used. Additionally, the property cannot be used as a binding value for mdv.

We could document that attributes with dashes are not supported.

However, we may want to convert these attributes to camelCased properties: an attribute "foo-bar" to a property "fooBar."

See feedback in https://groups.google.com/forum/#!topic/polymer-dev/GWzc8zekb-o

cc @ebidel

@michaelsbradleyjr
Copy link

+1 for auto-conversion or some workaround that allows attributes with dashes while preserving mdv binding and the firing of ..Changed methods.

@dfreedm
Copy link
Member

dfreedm commented Jul 24, 2013

If we have auto camelCased properties, maybe #142 should be supported by this mechanism as well?

@sorvell
Copy link
Contributor Author

sorvell commented Oct 2, 2013

Dup of #150

@sorvell sorvell closed this as completed Oct 2, 2013
@kaleb
Copy link

kaleb commented Apr 11, 2014

It took me a lot of debugging to realize that this was not supported.

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

No branches or pull requests

4 participants