karol-f / vue-custom-element

Vue Custom Element - Web Components' Custom Elements for Vue.js
https://karol-f.github.io/vue-custom-element/
MIT License
1.97k stars 187 forks source link

Firefox slot bug #106

Closed do-web closed 6 years ago

do-web commented 6 years ago

Custom element in custom element slot not working.

Here is an example

https://jsfiddle.net/8qb6ox04/

Chrome works fine, in FF it is not working.

I also tried with document-register-element, but it is also not working in FF Sometimes it works in FF sometimes not. So click multiple times on toggle, sometime the slot content will removed and empty.

karol-f commented 6 years ago

Ach, indeed. You need polyfill for Firefox.

In Firefox, for now, Custom Elements are available only after turning on flag in settings - but it's not an option for end-user.

So in short you have to add:

https://github.com/karol-f/vue-custom-element#optional-polyfill

Working example - https://codesandbox.io/s/0yz39lq43p