For older browsers that don’t support Declarative Shadow DOM, this component does include a small (4 LoC) polyfill but it is scoped exclusively to elements inside of <is-land>
.
Note that if chocolate-web-component.js
is not available on page load, any <chocolate-web-component>
elements outside of <is-land>
will be initialized when the file is loaded. This is better solved by implementing defer-hydration
in your component code.
Declarative shadow DOM polyfill is not applied to elements outside of an <is-land>