salesforce / lwc

⚡️ LWC - A Blazing Fast, Enterprise-Grade Web Components Foundation
https://lwc.dev
Other
1.59k stars 386 forks source link

fix(template-compiler): parsed template content should be allocated to `content.childNodes` #4311

Closed ekashida closed 1 week ago

ekashida commented 1 week ago

Details

Parse5 puts all child nodes of template tags into the content.childNodes property. Our parsing logic used to override Parse5 behavior puts the same child nodes in the childNodes property instead. Due to this discrepancy, the result is a loss of template expressions that are direct children of the template tag because subsequent logic looks for template content under content.childNodes.

Does this pull request introduce a breaking change?

Does this pull request introduce an observable change?

GUS work item

W-15451162