@vue/runtime-dom 3.2.25 → 3.2.29
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 +19 -10
- package/dist/runtime-dom.cjs.prod.js +19 -10
- package/dist/runtime-dom.d.ts +2 -0
- package/dist/runtime-dom.esm-browser.js +6549 -6512
- package/dist/runtime-dom.esm-browser.prod.js +1 -1
- package/dist/runtime-dom.esm-bundler.js +19 -10
- package/dist/runtime-dom.global.js +6533 -6495
- 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,24 @@ 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
|
+
// #5308 can only take cached path if:
|
|
68
|
+
// - has a single root node
|
|
69
|
+
// - nextSibling info is still available
|
|
70
|
+
if (start && (start === end || start.nextSibling)) {
|
|
71
|
+
// cached
|
|
72
|
+
while (true) {
|
|
73
|
+
parent.insertBefore(start.cloneNode(true), anchor);
|
|
74
|
+
if (start === end || !(start = start.nextSibling))
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
// fresh insert
|
|
80
|
+
templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content;
|
|
81
|
+
const template = templateContainer.content;
|
|
72
82
|
if (isSVG) {
|
|
73
83
|
// remove outer svg wrapper
|
|
74
84
|
const wrapper = template.firstChild;
|
|
@@ -77,9 +87,8 @@ const nodeOps = {
|
|
|
77
87
|
}
|
|
78
88
|
template.removeChild(wrapper);
|
|
79
89
|
}
|
|
80
|
-
|
|
90
|
+
parent.insertBefore(template, anchor);
|
|
81
91
|
}
|
|
82
|
-
parent.insertBefore(template.cloneNode(true), anchor);
|
|
83
92
|
return [
|
|
84
93
|
// first
|
|
85
94
|
before ? before.nextSibling : parent.firstChild,
|
|
@@ -371,7 +380,7 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
371
380
|
originalStop.call(e);
|
|
372
381
|
e._stopped = true;
|
|
373
382
|
};
|
|
374
|
-
return value.map(fn => (e) => !e._stopped && fn(e));
|
|
383
|
+
return value.map(fn => (e) => !e._stopped && fn && fn(e));
|
|
375
384
|
}
|
|
376
385
|
else {
|
|
377
386
|
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,24 @@ 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
|
+
// #5308 can only take cached path if:
|
|
68
|
+
// - has a single root node
|
|
69
|
+
// - nextSibling info is still available
|
|
70
|
+
if (start && (start === end || start.nextSibling)) {
|
|
71
|
+
// cached
|
|
72
|
+
while (true) {
|
|
73
|
+
parent.insertBefore(start.cloneNode(true), anchor);
|
|
74
|
+
if (start === end || !(start = start.nextSibling))
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
// fresh insert
|
|
80
|
+
templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content;
|
|
81
|
+
const template = templateContainer.content;
|
|
72
82
|
if (isSVG) {
|
|
73
83
|
// remove outer svg wrapper
|
|
74
84
|
const wrapper = template.firstChild;
|
|
@@ -77,9 +87,8 @@ const nodeOps = {
|
|
|
77
87
|
}
|
|
78
88
|
template.removeChild(wrapper);
|
|
79
89
|
}
|
|
80
|
-
|
|
90
|
+
parent.insertBefore(template, anchor);
|
|
81
91
|
}
|
|
82
|
-
parent.insertBefore(template.cloneNode(true), anchor);
|
|
83
92
|
return [
|
|
84
93
|
// first
|
|
85
94
|
before ? before.nextSibling : parent.firstChild,
|
|
@@ -367,7 +376,7 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
367
376
|
originalStop.call(e);
|
|
368
377
|
e._stopped = true;
|
|
369
378
|
};
|
|
370
|
-
return value.map(fn => (e) => !e._stopped && fn(e));
|
|
379
|
+
return value.map(fn => (e) => !e._stopped && fn && fn(e));
|
|
371
380
|
}
|
|
372
381
|
else {
|
|
373
382
|
return value;
|
package/dist/runtime-dom.d.ts
CHANGED