Always ignore parent component tags outside of `<body>`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 46
- Avg merge
- 10m
- Merged PRs (30d)
- 2
Description
We should never output a custom element name as a child of <html> or <head>. They are invalid there.
<!doctype html>
<html>
<head webc:is="my-component"></head>
<body>
<my-component></my-component>
</body>
</html>
Even if my-component has script or style (not an HTML-only component) we should exempt the parent tag from being rendered (outside of <body>)
Inspired by https://github.com/11ty/webc/issues/135#issuecomment-1478557230
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the HTML example in the issue and inspect how parent components are rendered inside and . Confirm that custom element names are omitted outside , including components with script or style, then add or run focused coverage for these cases and verify the generated HTML.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100