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

LitElement Handling Data section is not acurate #403

Closed
zevdg opened this issue Jan 14, 2019 · 1 comment · Fixed by #404
Closed

LitElement Handling Data section is not acurate #403

zevdg opened this issue Jan 14, 2019 · 1 comment · Fixed by #404

Comments

@zevdg
Copy link
Contributor

zevdg commented Jan 14, 2019

LitElement will pass data to an element as properties, as long as the property is defined on the element's prototype. Otherwise it will fallback to passing data as attributes.

I just asked on the LitElement slack and this is not true. lit-html uses attributes by default and has an alternate syntax to explicitly pass a property instead, just like Vue.

P.S. Historically, this one the other way around (properties by default and special syntax to explicitly specify attributes). This was changed in lit-html 0.11 via lit/lit#398

zevdg added a commit to zevdg/custom-elements-everywhere that referenced this issue Jan 14, 2019
@robdodson
Copy link
Contributor

Good catch. We were originally testing an older version of lit.

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 a pull request may close this issue.

2 participants