Skip to content

Commit f59554a

Browse files
committed
[build] 3.2.4
1 parent 324dbac commit f59554a

File tree

5 files changed

+20
-10
lines changed

5 files changed

+20
-10
lines changed

dist/vue-custom-element.esm.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* vue-custom-element v3.2.3
2+
* vue-custom-element v3.2.4
33
* (c) 2018 Karol Fabjańczuk
44
* @license MIT
55
*/
@@ -65,6 +65,11 @@ function registerCustomElement(tag) {
6565
typeof options.attributeChangedCallback === 'function' && options.attributeChangedCallback.call(this, name, oldValue, value);
6666
}
6767

68+
function define(tagName, CustomElement) {
69+
var existingCustomElement = customElements.get(tagName);
70+
return typeof existingCustomElement !== 'undefined' ? existingCustomElement : customElements.define(tagName, CustomElement);
71+
}
72+
6873
if (isES2015$1) {
6974
var CustomElement = function (_CustomElement2) {
7075
_inherits(CustomElement, _CustomElement2);
@@ -96,7 +101,7 @@ function registerCustomElement(tag) {
96101
CustomElement.prototype.disconnectedCallback = disconnectedCallback;
97102
CustomElement.prototype.attributeChangedCallback = attributeChangedCallback;
98103

99-
customElements.define(tag, CustomElement);
104+
define(tag, CustomElement);
100105
return CustomElement;
101106
} else {
102107
var _CustomElement3 = function _CustomElement3(self) {
@@ -120,7 +125,7 @@ function registerCustomElement(tag) {
120125
_CustomElement3.prototype.disconnectedCallback = disconnectedCallback;
121126
_CustomElement3.prototype.attributeChangedCallback = attributeChangedCallback;
122127

123-
customElements.define(tag, _CustomElement3);
128+
define(tag, _CustomElement3);
124129
return _CustomElement3;
125130
}
126131
}

dist/vue-custom-element.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* vue-custom-element v3.2.3
2+
* vue-custom-element v3.2.4
33
* (c) 2018 Karol Fabjańczuk
44
* @license MIT
55
*/
@@ -71,6 +71,11 @@ function registerCustomElement(tag) {
7171
typeof options.attributeChangedCallback === 'function' && options.attributeChangedCallback.call(this, name, oldValue, value);
7272
}
7373

74+
function define(tagName, CustomElement) {
75+
var existingCustomElement = customElements.get(tagName);
76+
return typeof existingCustomElement !== 'undefined' ? existingCustomElement : customElements.define(tagName, CustomElement);
77+
}
78+
7479
if (isES2015$1) {
7580
var CustomElement = function (_CustomElement2) {
7681
_inherits(CustomElement, _CustomElement2);
@@ -102,7 +107,7 @@ function registerCustomElement(tag) {
102107
CustomElement.prototype.disconnectedCallback = disconnectedCallback;
103108
CustomElement.prototype.attributeChangedCallback = attributeChangedCallback;
104109

105-
customElements.define(tag, CustomElement);
110+
define(tag, CustomElement);
106111
return CustomElement;
107112
} else {
108113
var _CustomElement3 = function _CustomElement3(self) {
@@ -126,7 +131,7 @@ function registerCustomElement(tag) {
126131
_CustomElement3.prototype.disconnectedCallback = disconnectedCallback;
127132
_CustomElement3.prototype.attributeChangedCallback = attributeChangedCallback;
128133

129-
customElements.define(tag, _CustomElement3);
134+
define(tag, _CustomElement3);
130135
return _CustomElement3;
131136
}
132137
}

0 commit comments

Comments
 (0)