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

Update values after upgrading custom elements #385

Merged
merged 4 commits into from
Jun 26, 2018

Conversation

bgotink
Copy link
Contributor

@bgotink bgotink commented Jun 26, 2018

No description provided.

@justinfagnani
Copy link
Collaborator

Awesome, this was next on my list :)

There's one more test that I'd like to add from user bug reports - make sure that property setters are called for custom elements inside of nested templates add after the initial render.

You can use the same custom element class in your test, but do something like this:

const t = (value: any) => html`${value}`;
render(t('A'), container);

const fragment = html`<x-test-uses-property-setters value=${'foo'}></x-test-uses-property-setters>`;
render(t(fragment), container);
// asserts

@bgotink
Copy link
Contributor Author

bgotink commented Jun 26, 2018

Alright! I've added the extra test.

These tests only run in browsers where custom elements are natively supported, it is probably interesting to test them with the customElements shim as well. I don't have time for this atm, but I'd be willing to look into that later this week.

Copy link
Collaborator

@justinfagnani justinfagnani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@justinfagnani justinfagnani merged commit 9595bde into lit:master Jun 26, 2018
@bgotink bgotink deleted the fix/update-after-upgrade branch June 28, 2018 19:41
neuronetio pushed a commit to neuronetio/lit-html that referenced this pull request Dec 2, 2019
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 this pull request may close these issues.

2 participants