An experiment to allow different versions of the same web component on one page
open-wc.org
open-wc.org
== copy of tweet content ==
Today we are releasing our first official "Experiment". It potentially allows you to use different versions of the same web-component on one page
In your template it looks normal but under the hood tag names are auto registered.
To get there you need to import side effect free classes and create a special html template literal which will make sure a unique tag name gets used if need be
It comes with a long list of limitations like ️ You can not use self registering elements ️ Every (!!!) component that uses sub components need to use scoped-elements ️ You can not use tag selectors ️ Performance degradation of up to 8% ️ ... see docs
Let's take this as an opportunity start a discussion about nested/scoped elements. You are invited
The docs are quite detailed and should give an idea why this is needed and how it works. More details will follow in a blog post