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

Add nothing sentinel #673

Merged
merged 2 commits into from
Dec 20, 2018
Merged

Add nothing sentinel #673

merged 2 commits into from
Dec 20, 2018

Conversation

ruphin
Copy link
Contributor

@ruphin ruphin commented Nov 30, 2018

Fixes #652

Also added a small test for the noChange sentinel.

src/lib/parts.ts Outdated Show resolved Hide resolved
@ruphin
Copy link
Contributor Author

ruphin commented Nov 30, 2018

Well this is awkward, calling clear() doesn't remove the markers. I'm going to have to rethink how to do this.

@justinfagnani
Copy link
Collaborator

clear() should not remove the markers. They're needed for future updates.

@ruphin
Copy link
Contributor Author

ruphin commented Dec 2, 2018

I was worried that the markers would prevent rendering the fallback content. Turns out they don't: https://codepen.io/ruphin/pen/bQZdYN?editors=1010

That means this implementation will work. I will update the tests to verify that no non-comment nodes remain after rendering nothing.

@justinfagnani justinfagnani merged commit 2b4c7b5 into lit:master Dec 20, 2018
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.

None yet

2 participants