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

Using the lwc:inner-html directive on a void element with the @lwc/ssr-compiler does not throw #5006

Open
jhefferman-sfdc opened this issue Dec 5, 2024 · 2 comments
Labels
BUG P3 SSR Up for grabs Issues that are relatively small, self-contained, and ready for implementation USER STORY

Comments

@jhefferman-sfdc
Copy link
Contributor

Description

@lwc/ssr-compiler behavior:
When rendering a void (self closing) element with the lwc:inner-html directive, the compiler does not throw, but renders the element without any children.

@lwc/engine-server (expected) behavior:
When rendering a void element with lwc:inner-html using @lwc/engine-server, the compiler does not render and an error is thrown.

Steps to Reproduce

<template>
   <input type="text" lwc:inner-html="child content">
   <span  lwc:inner-html="child content"></span>
</template>

Expected Results

The error Invalid count value is logged and the template is not rendered

Actual Results

The input is rendered as a void element without children and the compiler does not throw

Copy link

git2gus bot commented Dec 5, 2024

This issue has been linked to a new work item: W-17374159

@jhefferman-sfdc jhefferman-sfdc added USER STORY Up for grabs Issues that are relatively small, self-contained, and ready for implementation labels Dec 9, 2024
Copy link

git2gus bot commented Dec 9, 2024

This issue has been linked to a new work item: W-17395933

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG P3 SSR Up for grabs Issues that are relatively small, self-contained, and ready for implementation USER STORY
Projects
None yet
Development

No branches or pull requests

1 participant