Not able to render web component in grapesJS container for lit-element 3.0
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 21.8k
- Forks
- 1.1k
- Avg merge
- 18h 25m
- Merged PRs (30d)
- 2
Description
Description
I have created a web-component using lit and trying to render it in grapesJS container.
The component is rendering successfully in the grapesJS container in deprecated lit-element versions [2.4.0, 2.5.1].
But as we move to latest lit-element versions (3.0.0 and above) it is giving Failed to set the 'adoptedStyleSheets' property on 'ShadowRoot': Sharing constructed stylesheets in multiple documents is not allowed as the error.
Live Reproduction Link
CodeSandbox : https://codesandbox.io/embed/musing-grothendieck-9hved?fontsize=14&hidenavigation=1&theme=dark
Expected Results
Should be able to successfully render the web-component in grapesJS container for higher version of lit-element
Actual Results
Error : Failed to set the 'adoptedStyleSheets' property on 'ShadowRoot': Sharing constructed stylesheets in multiple documents is not allowed
Browsers Affected
Only using Chrome and Edge. And the above error is present in both
Contributor guide
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 failure in the linked CodeSandbox with lit-element 3.0 and the grapesJS container, then compare it with versions 2.4.0 and 2.5.1. Trace the adoptedStyleSheets error in Chrome or Edge; done means the web component renders successfully in the grapesJS container with a current lit-element version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100