Skip to content

Commit 626cb72

Browse files
committed
chore: rebuild the dist files
1 parent 9c1fe45 commit 626cb72

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

dist/vue-wc-wrapper.global.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ function convertAttributeValue (value, name, { type } = {}) {
4949
if (value === 'true' || value === 'false') {
5050
return value === 'true'
5151
}
52-
if (value === '' || value === name) {
52+
if (value === '' || value === name || value != null) {
5353
return true
5454
}
55-
return value != null
55+
return value
5656
} else if (isNumber(type)) {
5757
const parsed = parseFloat(value, 10);
5858
return isNaN(parsed) ? value : parsed
@@ -169,13 +169,13 @@ function wrap (Vue, Component) {
169169

170170
class CustomElement extends HTMLElement {
171171
constructor () {
172-
super();
173-
this.attachShadow({ mode: 'open' });
172+
const self = super();
173+
self.attachShadow({ mode: 'open' });
174174

175-
const wrapper = this._wrapper = new Vue({
175+
const wrapper = self._wrapper = new Vue({
176176
name: 'shadow-root',
177-
customElement: this,
178-
shadowRoot: this.shadowRoot,
177+
customElement: self,
178+
shadowRoot: self.shadowRoot,
179179
data () {
180180
return {
181181
props: {},
@@ -195,20 +195,20 @@ function wrap (Vue, Component) {
195195
let hasChildrenChange = false;
196196
for (let i = 0; i < mutations.length; i++) {
197197
const m = mutations[i];
198-
if (isInitialized && m.type === 'attributes' && m.target === this) {
199-
syncAttribute(this, m.attributeName);
198+
if (isInitialized && m.type === 'attributes' && m.target === self) {
199+
syncAttribute(self, m.attributeName);
200200
} else {
201201
hasChildrenChange = true;
202202
}
203203
}
204204
if (hasChildrenChange) {
205205
wrapper.slotChildren = Object.freeze(toVNodes(
206206
wrapper.$createElement,
207-
this.childNodes
207+
self.childNodes
208208
));
209209
}
210210
});
211-
observer.observe(this, {
211+
observer.observe(self, {
212212
childList: true,
213213
subtree: true,
214214
characterData: true,

dist/vue-wc-wrapper.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ function convertAttributeValue (value, name, { type } = {}) {
4646
if (value === 'true' || value === 'false') {
4747
return value === 'true'
4848
}
49-
if (value === '' || value === name) {
49+
if (value === '' || value === name || value != null) {
5050
return true
5151
}
52-
return value != null
52+
return value
5353
} else if (isNumber(type)) {
5454
const parsed = parseFloat(value, 10);
5555
return isNaN(parsed) ? value : parsed
@@ -166,13 +166,13 @@ function wrap (Vue, Component) {
166166

167167
class CustomElement extends HTMLElement {
168168
constructor () {
169-
super();
170-
this.attachShadow({ mode: 'open' });
169+
const self = super();
170+
self.attachShadow({ mode: 'open' });
171171

172-
const wrapper = this._wrapper = new Vue({
172+
const wrapper = self._wrapper = new Vue({
173173
name: 'shadow-root',
174-
customElement: this,
175-
shadowRoot: this.shadowRoot,
174+
customElement: self,
175+
shadowRoot: self.shadowRoot,
176176
data () {
177177
return {
178178
props: {},
@@ -192,20 +192,20 @@ function wrap (Vue, Component) {
192192
let hasChildrenChange = false;
193193
for (let i = 0; i < mutations.length; i++) {
194194
const m = mutations[i];
195-
if (isInitialized && m.type === 'attributes' && m.target === this) {
196-
syncAttribute(this, m.attributeName);
195+
if (isInitialized && m.type === 'attributes' && m.target === self) {
196+
syncAttribute(self, m.attributeName);
197197
} else {
198198
hasChildrenChange = true;
199199
}
200200
}
201201
if (hasChildrenChange) {
202202
wrapper.slotChildren = Object.freeze(toVNodes(
203203
wrapper.$createElement,
204-
this.childNodes
204+
self.childNodes
205205
));
206206
}
207207
});
208-
observer.observe(this, {
208+
observer.observe(self, {
209209
childList: true,
210210
subtree: true,
211211
characterData: true,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy