[labs/ssr] Emit lit-node marker before node to support raw text nodes.#3667
Merged
kevinpschaaf merged 2 commits intomainfrom Feb 14, 2023
Merged
[labs/ssr] Emit lit-node marker before node to support raw text nodes.#3667kevinpschaaf merged 2 commits intomainfrom
kevinpschaaf merged 2 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: e9061f3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
📊 Tachometer Benchmark ResultsSummarynop-update
render
update
update-reflect
Resultslit-element-list
render
update
update-reflect
lit-html-kitchen-sink
render
update
nop-update
lit-html-repeat
render
update
lit-html-template-heavy
render
update
reactive-element-list
render
update
update-reflect
|
augustjk
approved these changes
Feb 14, 2023
Member
augustjk
left a comment
There was a problem hiding this comment.
LGTM with the one minor suggestion.
1 task
Merged
1 task
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.
Moves the
<!--lit-node n-->marker for identifying nodes that hydration needs to stop at (to hydrate attribute/property/event/element parts and removedefer-hydrationattributes) from after the start tag to before it.This makes it compatible with bindings to the open tag of "raw text elements" (
style,script,textarea,title) whose child content is parsed as raw text rather than nodes. This requires a quick lookahead in the opcode parsing to note whether the node in question has bindings, and if so write out the node marker before the tag is opened.This had the side-effect of simplifying the condition around whether to completely finish writing out the open tag or not, since now that condition is only whether the node is a custom element or not.
Fixes #3663