marko 5.32.8 → 5.32.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -115,8 +115,14 @@ module.exports = function awaitTag(input, out) {
|
|
115
115
|
nextId: 0
|
116
116
|
});
|
117
117
|
|
118
|
-
|
119
|
-
var
|
118
|
+
/** SHOULD MATCH THE reorder-renderer.js IMPLEMENTATION */
|
119
|
+
var reorderFunctionId =
|
120
|
+
out.global.runtimeId !== "M" ? "af" + out.global.runtimeId : "af";
|
121
|
+
|
122
|
+
var id = awaitInfo.id =
|
123
|
+
input.name ||
|
124
|
+
(out.global.componentIdPrefix || 0) + clientReorderContext.nextId++;
|
125
|
+
var placeholderIdAttrValue = reorderFunctionId + "ph" + id;
|
120
126
|
|
121
127
|
if (placeholderRenderer) {
|
122
128
|
out.write('<span id="' + placeholderIdAttrValue + '">');
|
@@ -24,6 +24,10 @@ module.exports = function (input, out) {
|
|
24
24
|
out.flush();
|
25
25
|
}
|
26
26
|
|
27
|
+
/** SHOULD MATCH THE renderer.js IMPLEMENTATION */
|
28
|
+
var reorderFunctionId =
|
29
|
+
out.global.runtimeId !== "M" ? "af" + out.global.runtimeId : "af";
|
30
|
+
|
27
31
|
var asyncOut = out.beginAsync({
|
28
32
|
last: true,
|
29
33
|
timeout: -1,
|
@@ -52,7 +56,7 @@ module.exports = function (input, out) {
|
|
52
56
|
if (!global._afRuntime) {
|
53
57
|
// Minified version of ./client-reorder-runtime.js
|
54
58
|
asyncOut.script(
|
55
|
-
`function
|
59
|
+
`function $${reorderFunctionId}(d,a,e,l,g,h,k,b,f,c){c=$${reorderFunctionId};if(a&&!c[a])(c[a+="$"]||(c[a]=[])).push(d);else{e=document;l=e.getElementById("${reorderFunctionId}"+d);g=e.getElementById("${reorderFunctionId}ph"+d);h=e.createDocumentFragment();k=l.childNodes;b=0;for(f=k.length;b<f;b++)h.appendChild(k.item(0));g&&g.parentNode.replaceChild(h,g);c[d]=1;if(a=c[d+"$"])for(b=0,f=a.length;b<f;b++)c(a[b])}}`
|
56
60
|
);
|
57
61
|
global._afRuntime = true;
|
58
62
|
}
|
@@ -62,11 +66,11 @@ module.exports = function (input, out) {
|
|
62
66
|
'<style nonce="' +
|
63
67
|
escapeDoubleQuotes(global.cspNonce) +
|
64
68
|
'">' +
|
65
|
-
|
69
|
+
`#${reorderFunctionId}` +
|
66
70
|
awaitInfo.id +
|
67
71
|
"{display:none;}" +
|
68
72
|
"</style>" +
|
69
|
-
|
73
|
+
`<div id="${reorderFunctionId}` +
|
70
74
|
awaitInfo.id +
|
71
75
|
'">' +
|
72
76
|
result.toString() +
|
@@ -74,7 +78,7 @@ module.exports = function (input, out) {
|
|
74
78
|
);
|
75
79
|
} else {
|
76
80
|
asyncOut.write(
|
77
|
-
|
81
|
+
`<div id="${reorderFunctionId}` +
|
78
82
|
awaitInfo.id +
|
79
83
|
'" style="display:none">' +
|
80
84
|
result.toString() +
|
@@ -83,7 +87,7 @@ module.exports = function (input, out) {
|
|
83
87
|
}
|
84
88
|
|
85
89
|
asyncOut.script(
|
86
|
-
|
90
|
+
`$${reorderFunctionId}(` + (
|
87
91
|
typeof awaitInfo.id === "number" ?
|
88
92
|
awaitInfo.id :
|
89
93
|
'"' + awaitInfo.id + '"') + (
|
package/package.json
CHANGED
@@ -115,8 +115,14 @@ module.exports = function awaitTag(input, out) {
|
|
115
115
|
nextId: 0,
|
116
116
|
});
|
117
117
|
|
118
|
-
|
119
|
-
var
|
118
|
+
/** SHOULD MATCH THE reorder-renderer.js IMPLEMENTATION */
|
119
|
+
var reorderFunctionId =
|
120
|
+
out.global.runtimeId !== "M" ? "af" + out.global.runtimeId : "af";
|
121
|
+
|
122
|
+
var id = (awaitInfo.id =
|
123
|
+
input.name ||
|
124
|
+
(out.global.componentIdPrefix || 0) + clientReorderContext.nextId++);
|
125
|
+
var placeholderIdAttrValue = reorderFunctionId + "ph" + id;
|
120
126
|
|
121
127
|
if (placeholderRenderer) {
|
122
128
|
out.write('<span id="' + placeholderIdAttrValue + '">');
|
@@ -24,6 +24,10 @@ module.exports = function (input, out) {
|
|
24
24
|
out.flush();
|
25
25
|
}
|
26
26
|
|
27
|
+
/** SHOULD MATCH THE renderer.js IMPLEMENTATION */
|
28
|
+
var reorderFunctionId =
|
29
|
+
out.global.runtimeId !== "M" ? "af" + out.global.runtimeId : "af";
|
30
|
+
|
27
31
|
var asyncOut = out.beginAsync({
|
28
32
|
last: true,
|
29
33
|
timeout: -1,
|
@@ -52,7 +56,7 @@ module.exports = function (input, out) {
|
|
52
56
|
if (!global._afRuntime) {
|
53
57
|
// Minified version of ./client-reorder-runtime.js
|
54
58
|
asyncOut.script(
|
55
|
-
`function
|
59
|
+
`function $${reorderFunctionId}(d,a,e,l,g,h,k,b,f,c){c=$${reorderFunctionId};if(a&&!c[a])(c[a+="$"]||(c[a]=[])).push(d);else{e=document;l=e.getElementById("${reorderFunctionId}"+d);g=e.getElementById("${reorderFunctionId}ph"+d);h=e.createDocumentFragment();k=l.childNodes;b=0;for(f=k.length;b<f;b++)h.appendChild(k.item(0));g&&g.parentNode.replaceChild(h,g);c[d]=1;if(a=c[d+"$"])for(b=0,f=a.length;b<f;b++)c(a[b])}}`,
|
56
60
|
);
|
57
61
|
global._afRuntime = true;
|
58
62
|
}
|
@@ -62,11 +66,11 @@ module.exports = function (input, out) {
|
|
62
66
|
'<style nonce="' +
|
63
67
|
escapeDoubleQuotes(global.cspNonce) +
|
64
68
|
'">' +
|
65
|
-
|
69
|
+
`#${reorderFunctionId}` +
|
66
70
|
awaitInfo.id +
|
67
71
|
"{display:none;}" +
|
68
72
|
"</style>" +
|
69
|
-
|
73
|
+
`<div id="${reorderFunctionId}` +
|
70
74
|
awaitInfo.id +
|
71
75
|
'">' +
|
72
76
|
result.toString() +
|
@@ -74,7 +78,7 @@ module.exports = function (input, out) {
|
|
74
78
|
);
|
75
79
|
} else {
|
76
80
|
asyncOut.write(
|
77
|
-
|
81
|
+
`<div id="${reorderFunctionId}` +
|
78
82
|
awaitInfo.id +
|
79
83
|
'" style="display:none">' +
|
80
84
|
result.toString() +
|
@@ -83,7 +87,7 @@ module.exports = function (input, out) {
|
|
83
87
|
}
|
84
88
|
|
85
89
|
asyncOut.script(
|
86
|
-
|
90
|
+
`$${reorderFunctionId}(` +
|
87
91
|
(typeof awaitInfo.id === "number"
|
88
92
|
? awaitInfo.id
|
89
93
|
: '"' + awaitInfo.id + '"') +
|