@vue/runtime-dom 3.2.24 → 3.2.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runtime-dom.cjs.js +16 -10
- package/dist/runtime-dom.cjs.prod.js +16 -10
- package/dist/runtime-dom.d.ts +2 -0
- package/dist/runtime-dom.esm-browser.js +6507 -6440
- package/dist/runtime-dom.esm-browser.prod.js +1 -1
- package/dist/runtime-dom.esm-bundler.js +16 -10
- package/dist/runtime-dom.global.js +6508 -6440
- package/dist/runtime-dom.global.prod.js +1 -1
- package/package.json +6 -6
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -7,7 +7,7 @@ var shared = require('@vue/shared');
|
|
|
7
7
|
|
|
8
8
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
9
9
|
const doc = (typeof document !== 'undefined' ? document : null);
|
|
10
|
-
const
|
|
10
|
+
const templateContainer = doc && doc.createElement('template');
|
|
11
11
|
const nodeOps = {
|
|
12
12
|
insert: (child, parent, anchor) => {
|
|
13
13
|
parent.insertBefore(child, anchor || null);
|
|
@@ -61,14 +61,21 @@ const nodeOps = {
|
|
|
61
61
|
// Reason: innerHTML.
|
|
62
62
|
// Static content here can only come from compiled templates.
|
|
63
63
|
// As long as the user only uses trusted templates, this is safe.
|
|
64
|
-
insertStaticContent(content, parent, anchor, isSVG) {
|
|
64
|
+
insertStaticContent(content, parent, anchor, isSVG, start, end) {
|
|
65
65
|
// <parent> before | first ... last | anchor </parent>
|
|
66
66
|
const before = anchor ? anchor.previousSibling : parent.lastChild;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
if (start && end) {
|
|
68
|
+
// cached
|
|
69
|
+
while (true) {
|
|
70
|
+
parent.insertBefore(start.cloneNode(true), anchor);
|
|
71
|
+
if (start === end || !(start = start.nextSibling))
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
// fresh insert
|
|
77
|
+
templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content;
|
|
78
|
+
const template = templateContainer.content;
|
|
72
79
|
if (isSVG) {
|
|
73
80
|
// remove outer svg wrapper
|
|
74
81
|
const wrapper = template.firstChild;
|
|
@@ -77,9 +84,8 @@ const nodeOps = {
|
|
|
77
84
|
}
|
|
78
85
|
template.removeChild(wrapper);
|
|
79
86
|
}
|
|
80
|
-
|
|
87
|
+
parent.insertBefore(template, anchor);
|
|
81
88
|
}
|
|
82
|
-
parent.insertBefore(template.cloneNode(true), anchor);
|
|
83
89
|
return [
|
|
84
90
|
// first
|
|
85
91
|
before ? before.nextSibling : parent.firstChild,
|
|
@@ -371,7 +377,7 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
371
377
|
originalStop.call(e);
|
|
372
378
|
e._stopped = true;
|
|
373
379
|
};
|
|
374
|
-
return value.map(fn => (e) => !e._stopped && fn(e));
|
|
380
|
+
return value.map(fn => (e) => !e._stopped && fn && fn(e));
|
|
375
381
|
}
|
|
376
382
|
else {
|
|
377
383
|
return value;
|
|
@@ -7,7 +7,7 @@ var shared = require('@vue/shared');
|
|
|
7
7
|
|
|
8
8
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
9
9
|
const doc = (typeof document !== 'undefined' ? document : null);
|
|
10
|
-
const
|
|
10
|
+
const templateContainer = doc && doc.createElement('template');
|
|
11
11
|
const nodeOps = {
|
|
12
12
|
insert: (child, parent, anchor) => {
|
|
13
13
|
parent.insertBefore(child, anchor || null);
|
|
@@ -61,14 +61,21 @@ const nodeOps = {
|
|
|
61
61
|
// Reason: innerHTML.
|
|
62
62
|
// Static content here can only come from compiled templates.
|
|
63
63
|
// As long as the user only uses trusted templates, this is safe.
|
|
64
|
-
insertStaticContent(content, parent, anchor, isSVG) {
|
|
64
|
+
insertStaticContent(content, parent, anchor, isSVG, start, end) {
|
|
65
65
|
// <parent> before | first ... last | anchor </parent>
|
|
66
66
|
const before = anchor ? anchor.previousSibling : parent.lastChild;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
if (start && end) {
|
|
68
|
+
// cached
|
|
69
|
+
while (true) {
|
|
70
|
+
parent.insertBefore(start.cloneNode(true), anchor);
|
|
71
|
+
if (start === end || !(start = start.nextSibling))
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
// fresh insert
|
|
77
|
+
templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content;
|
|
78
|
+
const template = templateContainer.content;
|
|
72
79
|
if (isSVG) {
|
|
73
80
|
// remove outer svg wrapper
|
|
74
81
|
const wrapper = template.firstChild;
|
|
@@ -77,9 +84,8 @@ const nodeOps = {
|
|
|
77
84
|
}
|
|
78
85
|
template.removeChild(wrapper);
|
|
79
86
|
}
|
|
80
|
-
|
|
87
|
+
parent.insertBefore(template, anchor);
|
|
81
88
|
}
|
|
82
|
-
parent.insertBefore(template.cloneNode(true), anchor);
|
|
83
89
|
return [
|
|
84
90
|
// first
|
|
85
91
|
before ? before.nextSibling : parent.firstChild,
|
|
@@ -367,7 +373,7 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
367
373
|
originalStop.call(e);
|
|
368
374
|
e._stopped = true;
|
|
369
375
|
};
|
|
370
|
-
return value.map(fn => (e) => !e._stopped && fn(e));
|
|
376
|
+
return value.map(fn => (e) => !e._stopped && fn && fn(e));
|
|
371
377
|
}
|
|
372
378
|
else {
|
|
373
379
|
return value;
|
package/dist/runtime-dom.d.ts
CHANGED