Open shadowRoot?
See original GitHub issueIs there a specific reason the shadowRoot
is closed in the web component?
I’m using adopted stylesheets to reset the default width
& height
to inherit
so I can just adjust with classes, and it’s working fine, but I’m curious if there was a reason it was closed, and if it would make more sense to open it.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
ShadowRoot.mode - Web APIs | MDN
The mode read-only property of the ShadowRoot specifies its mode — either open or closed . This defines whether or not the shadow...
Read more >html - What is shadow root
This is a special indicator that a Shadow DOM exists. These have existed for years, but developers have never been given APIs into...
Read more >Open vs. Closed Shadow DOM - RevillWeb
We can interact with the shadow root just like we would any DOM tree. For example we could use: this.shadowRoot.querySelector("p");. To query ...
Read more >What is shadow root and how to use it
“open” – open means that you can access the shadow DOM using JavaScript. For example using the Element.shadowRoot property: let myShadowDom ...
Read more >5. Working with the Shadow DOM - Modern JavaScript [Book]
A shadow host is a DOM node that contains a shadow root. ... but most applications leverage open source libraries such as jQuery...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Remembered why it was done: component rendered only 2 nodes: style + icon. When updating child elements, it assumed that first element is style and second is icon, so adding extra code could mess it up.
I’ve updated code to handle it differently, so custom code should not cause problems and opened shadowRoot. Will release new version later today.
Working on my end!