Backward compatibility keeps a component usable when browsers lack newer platform features. A practical strategy is to polyfill Custom Elements while making Shadow DOM optional instead of hiding its limitations behind a polyfill. section 12.1
A compatibility-oriented component can:
- Load the drop-in Custom Elements polyfill from a CDN. section 12.1
Optional Shadow DOM
Set a component flag such as USE_SHADOWDOM_WHEN_AVAILABLE. If the flag and attachShadow are available, use the shadow root; otherwise use the component itself as the rendering root.

















