How can I use Polymer 2 elements in Polymer 3 element? The following doesn't work since <link>
element doesn't work inside shadow dom.
static get template() {
return '
<link rel="import" href="...">
<my-element></my-element>';
}
We can simply take out <link>
outside of the element and put at the top level, but that feels like breaking component-ness.
You can't load two version of Polymer (Polymer 2/1 and Polymer 3) because Polymer register some custom-elements to the api of webcomponents and when you try to load a component from Polymer 2 and another of Polymer 3 it tells you that you can't register x custom-element again.
But you can use LitElement and a component from Polymer 2/1, you just have to use html-import-js inside your LitElement component.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With