The light DOM and the shadow DOM is referred to as the logical DOM. When polyfilling custom elements, we specifically use the custom element polyfill. Learn more. There are some that can't have a shadow DOM for security reasons (for example ), and more besides. Polyfilling JS access to your DOM is easy. Alternatively, you can directly use webcomponents.js (or the minified webcomponents.min.js file) in your project. With Shadow DOM, elements can get a new kind of node associated with them. These polyfills provide reasonable emulation of native shadow DOM while maintaining good performance.

5. A polyfill to provide Shadow DOM functionality in browsers that don't support it natively. An important aspect of the shadow DOM is that events are retargetted to never expose the shadow DOM to the light DOM. The content of a shadow host isn’t rendered; the content of the shadow root is rendered instead.