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

Test transitions from differing value types for the same content binding. #223

Open
theengineear opened this issue Nov 20, 2024 · 0 comments

Comments

@theengineear
Copy link
Collaborator

We’re missing some important edge-cases here in our test suite (some of which are real bugs). One example is switching content from an unsafeHTML updater to plain null or some such.

return html`${foo ? unsafeHTML(foo) : null}`

If the first time you render, foo is a markup string… and then the next time you render… foo is null… the engine won’t reset the DOM. And, in this case, you really want that DOM to get reset!

The fix is to add (and test) a simple method to determine if a DOM reset is required or not.

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

1 participant