Closed zoeyfyi closed 6 years ago
As explained in there:
class CustomElement extends HTMLElement {
constructor () {
const self = super()
self.attachShadow({ mode: 'open' })
const wrapper = self._wrapper = new Vue({
...
return self;
}
Be aware this polyfill doesn't provide Shadow DOM neither, so you might use attachshadow or simply stick with webcomponentsjs
Yeah that's what I had done but I was trying to avoid forking vue-web-component-wrapper.
Thanks anyway
I was trying to avoid forking vue-web-component-wrapper
they are ignoring how super()
works, which might return a different instance as per specifications.
I'd rather file a bug to their current code than forking it 'cause it won't break anywhere but it will work better in any sort of native constructors patches.
P.S. the exact fix should be ...
class CustomElement extends HTMLElement {
constructor (...args) {
const self = super(...args)
Due to https://github.com/WebReflection/document-register-element/tree/master#v1-caveat this polyfill doesn't work with https://github.com/vuejs/vue-web-component-wrapper.
(from src/index.js line 81)
Since it does work with https://github.com/webcomponents/webcomponentsjs I was wondering if their is a potential fix.