File tree 1 file changed +9
-9
lines changed
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -80,13 +80,13 @@ export default function wrap (Vue, Component) {
80
80
81
81
class CustomElement extends HTMLElement {
82
82
constructor ( ) {
83
- super ( )
84
- this . attachShadow ( { mode : 'open' } )
83
+ const self = super ( )
84
+ self . attachShadow ( { mode : 'open' } )
85
85
86
- const wrapper = this . _wrapper = new Vue ( {
86
+ const wrapper = self . _wrapper = new Vue ( {
87
87
name : 'shadow-root' ,
88
- customElement : this ,
89
- shadowRoot : this . shadowRoot ,
88
+ customElement : self ,
89
+ shadowRoot : self . shadowRoot ,
90
90
data ( ) {
91
91
return {
92
92
props : { } ,
@@ -106,20 +106,20 @@ export default function wrap (Vue, Component) {
106
106
let hasChildrenChange = false
107
107
for ( let i = 0 ; i < mutations . length ; i ++ ) {
108
108
const m = mutations [ i ]
109
- if ( isInitialized && m . type === 'attributes' && m . target === this ) {
110
- syncAttribute ( this , m . attributeName )
109
+ if ( isInitialized && m . type === 'attributes' && m . target === self ) {
110
+ syncAttribute ( self , m . attributeName )
111
111
} else {
112
112
hasChildrenChange = true
113
113
}
114
114
}
115
115
if ( hasChildrenChange ) {
116
116
wrapper . slotChildren = Object . freeze ( toVNodes (
117
117
wrapper . $createElement ,
118
- this . childNodes
118
+ self . childNodes
119
119
) )
120
120
}
121
121
} )
122
- observer . observe ( this , {
122
+ observer . observe ( self , {
123
123
childList : true ,
124
124
subtree : true ,
125
125
characterData : true ,
You can’t perform that action at this time.
0 commit comments