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

Set attributes on custom elements as properties #278

Open
chasenlehara opened this Issue Aug 24, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@chasenlehara
Member

chasenlehara commented Aug 24, 2017

When passing attributes on a custom element, the values should be set as properties so you can pass object values.

JS Bin example: https://bitovi-jsbin.jsbin.com/webihac/9/edit?js,console

@matthewp

This comment has been minimized.

Show comment
Hide comment
@matthewp

matthewp Aug 24, 2017

Contributor

For can-element it will go through the properties if the properties are defined. For custom elements that are not ours I think it will set an attribute, which is not what you want. I would suggest adding an in check, and if the property exists, set that before trying to set an attribute.

Contributor

matthewp commented Aug 24, 2017

For can-element it will go through the properties if the properties are defined. For custom elements that are not ours I think it will set an attribute, which is not what you want. I would suggest adding an in check, and if the property exists, set that before trying to set an attribute.

@robdodson robdodson referenced this issue Aug 25, 2017

Merged

Add CanJS #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment