Repository navigation
Conversation
This has the tests passing in a mainline browser without DOM Parts, ~30 tests fail when running with DOM Parts.
Needed to support an additional attribute encoding for this. Chrome Canary with experimental web platform features escapes `<` and `>` in attribute values in the innerHTML serialization. This is getting a somewhat old canary though, it doesn't have the DOM Parts prototype.
This seems inefficient, though it gets the tests passing. Still investigating.
With this change, all of our tests are passing with both manual parts or DOM Parts, or they have been marked as skipped with a function taht explains why.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This uses an unoptimized one-time template prep step, building on top of Lit's getTemplateHtml function to generate the DOM parts, but for all subsequent renders of that template we can use a fast clone.
Currently does feature detection by looking for ChildNodePart. When that's not present, it falls back to the existing implementation.
One issue with the implementation in Chrome Canary right now, it seems like a ChildNodePart can't be used with nodes that have a document fragment as their parent: https://lit.dev/playground/#gist=fed0fb43c92cd1198e66f84b34ad48d4
Unfortunately this is a pattern we do a ton in our unit tests.