marko 5.33.4 → 5.33.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/runtime/helpers/tags-compat/dom-debug.js +1 -1
- package/dist/runtime/helpers/tags-compat/dom-debug.mjs +2 -2
- package/dist/runtime/helpers/tags-compat/dom.js +1 -1
- package/dist/runtime/helpers/tags-compat/dom.mjs +2 -2
- package/dist/runtime/helpers/tags-compat/html-debug.mjs +1 -1
- package/dist/runtime/helpers/tags-compat/html.mjs +1 -1
- package/dist/runtime/helpers/tags-compat/runtime-dom.js +38 -85
- package/dist/runtime/helpers/tags-compat/runtime-html.js +4 -4
- package/dist/runtime/html/AsyncStream.js +12 -12
- package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
- package/dist/runtime/html/helpers/attr.js +3 -3
- package/dist/runtime/html/helpers/data-marko.js +1 -1
- package/dist/runtime/html/helpers/escape-quotes.js +1 -1
- package/dist/runtime/html/helpers/escape-xml.js +1 -1
- package/dist/runtime/renderable.js +3 -3
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +67 -67
- package/dist/runtime/vdom/VComponent.js +3 -3
- package/dist/runtime/vdom/VDocumentFragment.js +7 -7
- package/dist/runtime/vdom/VElement.js +35 -35
- package/dist/runtime/vdom/VFragment.js +5 -5
- package/dist/runtime/vdom/VNode.js +30 -30
- package/dist/runtime/vdom/VText.js +8 -8
- package/dist/runtime/vdom/helpers/const-element.js +3 -3
- package/dist/runtime/vdom/hot-reload.js +2 -2
- package/dist/runtime/vdom/morphdom/fragment.js +3 -3
- package/dist/runtime/vdom/morphdom/helpers.js +1 -1
- package/dist/runtime/vdom/morphdom/index.js +31 -31
- package/dist/runtime/vdom/vdom.js +14 -14
- package/package.json +2 -2
- package/src/runtime/helpers/tags-compat/dom-debug.js +1 -1
- package/src/runtime/helpers/tags-compat/dom-debug.mjs +2 -2
- package/src/runtime/helpers/tags-compat/dom.js +1 -1
- package/src/runtime/helpers/tags-compat/dom.mjs +2 -2
- package/src/runtime/helpers/tags-compat/html-debug.mjs +1 -1
- package/src/runtime/helpers/tags-compat/html.mjs +1 -1
- package/src/runtime/helpers/tags-compat/runtime-dom.js +37 -84
- package/src/runtime/helpers/tags-compat/runtime-html.js +1 -1
@@ -3,20 +3,20 @@ var RenderResult = require("../RenderResult");
|
|
3
3
|
var attrsHelper = require("./helpers/attrs");
|
4
4
|
var morphdom = require("./morphdom");
|
5
5
|
var vdom = require("./vdom");
|
6
|
-
var VElement = vdom.
|
7
|
-
var VDocumentFragment = vdom.
|
8
|
-
var VText = vdom.
|
9
|
-
var VComponent = vdom.
|
10
|
-
var VFragment = vdom.
|
11
|
-
var virtualizeHTML = vdom.
|
6
|
+
var VElement = vdom.bv_;
|
7
|
+
var VDocumentFragment = vdom.bw_;
|
8
|
+
var VText = vdom.bx_;
|
9
|
+
var VComponent = vdom.by_;
|
10
|
+
var VFragment = vdom.bz_;
|
11
|
+
var virtualizeHTML = vdom.bA_;
|
12
12
|
|
13
13
|
var EVENT_UPDATE = "update";
|
14
14
|
var EVENT_FINISH = "finish";
|
15
15
|
|
16
16
|
function State(tree) {
|
17
|
-
this.
|
18
|
-
this.
|
19
|
-
this.
|
17
|
+
this.bB_ = new EventEmitter();
|
18
|
+
this.bC_ = tree;
|
19
|
+
this.bD_ = false;
|
20
20
|
}
|
21
21
|
|
22
22
|
function AsyncVDOMBuilder(globalData, parentNode, parentOut) {
|
@@ -32,18 +32,18 @@ function AsyncVDOMBuilder(globalData, parentNode, parentOut) {
|
|
32
32
|
state = new State(parentNode);
|
33
33
|
}
|
34
34
|
|
35
|
-
this.
|
36
|
-
this.
|
37
|
-
this.
|
38
|
-
this.
|
35
|
+
this.bE_ = 1;
|
36
|
+
this.bF_ = 0;
|
37
|
+
this.bG_ = null;
|
38
|
+
this.bH_ = parentOut;
|
39
39
|
|
40
40
|
this.data = {};
|
41
41
|
this.y_ = state;
|
42
42
|
this._Z_ = parentNode;
|
43
43
|
this.global = globalData || {};
|
44
|
-
this.
|
45
|
-
this.
|
46
|
-
this.
|
44
|
+
this.bI_ = [parentNode];
|
45
|
+
this.bJ_ = false;
|
46
|
+
this.bK_ = undefined;
|
47
47
|
this.b_ = null;
|
48
48
|
|
49
49
|
this._X_ = null;
|
@@ -52,23 +52,23 @@ function AsyncVDOMBuilder(globalData, parentNode, parentOut) {
|
|
52
52
|
}
|
53
53
|
|
54
54
|
var proto = AsyncVDOMBuilder.prototype = {
|
55
|
-
|
55
|
+
bp_: true,
|
56
56
|
A_: typeof document === "object" && document,
|
57
57
|
|
58
58
|
bc: function (component, key, ownerComponent) {
|
59
59
|
var vComponent = new VComponent(component, key, ownerComponent);
|
60
|
-
return this.
|
60
|
+
return this.bL_(vComponent, 0, true);
|
61
61
|
},
|
62
62
|
|
63
63
|
ba_: function (component, key, ownerComponent) {
|
64
64
|
var vComponent = new VComponent(component, key, ownerComponent, true);
|
65
|
-
this.
|
65
|
+
this.bL_(vComponent, 0);
|
66
66
|
},
|
67
67
|
|
68
|
-
|
69
|
-
this._Z_.
|
68
|
+
bL_: function (child, childCount, pushToStack) {
|
69
|
+
this._Z_.bM_(child);
|
70
70
|
if (pushToStack === true) {
|
71
|
-
this.
|
71
|
+
this.bI_.push(child);
|
72
72
|
this._Z_ = child;
|
73
73
|
}
|
74
74
|
return childCount === 0 ? this : child;
|
@@ -84,7 +84,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
84
84
|
flags,
|
85
85
|
props
|
86
86
|
);
|
87
|
-
return this.
|
87
|
+
return this.bL_(element, childCount);
|
88
88
|
},
|
89
89
|
|
90
90
|
bj_: function (tagName, attrs, key, componentDef, props) {
|
@@ -102,7 +102,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
102
102
|
n: function (node, component) {
|
103
103
|
// NOTE: We do a shallow clone since we assume the node is being reused
|
104
104
|
// and a node can only have one parent node.
|
105
|
-
var clone = node.
|
105
|
+
var clone = node.bN_();
|
106
106
|
this.node(clone);
|
107
107
|
clone._J_ = component;
|
108
108
|
|
@@ -110,7 +110,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
110
110
|
},
|
111
111
|
|
112
112
|
node: function (node) {
|
113
|
-
this._Z_.
|
113
|
+
this._Z_.bM_(node);
|
114
114
|
return this;
|
115
115
|
},
|
116
116
|
|
@@ -129,7 +129,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
129
129
|
text = text.toString();
|
130
130
|
}
|
131
131
|
|
132
|
-
this._Z_.
|
132
|
+
this._Z_.bM_(new VText(text, ownerComponent));
|
133
133
|
return this;
|
134
134
|
},
|
135
135
|
|
@@ -160,7 +160,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
160
160
|
flags,
|
161
161
|
props
|
162
162
|
);
|
163
|
-
this.
|
163
|
+
this.bL_(element, childCount, true);
|
164
164
|
return this;
|
165
165
|
},
|
166
166
|
|
@@ -178,7 +178,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
178
178
|
|
179
179
|
bf: function (key, component, preserve) {
|
180
180
|
var fragment = new VFragment(key, component, preserve);
|
181
|
-
this.
|
181
|
+
this.bL_(fragment, null, true);
|
182
182
|
return this;
|
183
183
|
},
|
184
184
|
|
@@ -187,7 +187,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
187
187
|
},
|
188
188
|
|
189
189
|
endElement: function () {
|
190
|
-
var stack = this.
|
190
|
+
var stack = this.bI_;
|
191
191
|
stack.pop();
|
192
192
|
this._Z_ = stack[stack.length - 1];
|
193
193
|
},
|
@@ -195,44 +195,44 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
195
195
|
end: function () {
|
196
196
|
this._Z_ = undefined;
|
197
197
|
|
198
|
-
var remaining = --this.
|
199
|
-
var parentOut = this.
|
198
|
+
var remaining = --this.bE_;
|
199
|
+
var parentOut = this.bH_;
|
200
200
|
|
201
201
|
if (remaining === 0) {
|
202
202
|
if (parentOut) {
|
203
|
-
parentOut.
|
203
|
+
parentOut.bO_();
|
204
204
|
} else {
|
205
|
-
this.
|
205
|
+
this.bP_();
|
206
206
|
}
|
207
|
-
} else if (remaining - this.
|
208
|
-
this.
|
207
|
+
} else if (remaining - this.bF_ === 0) {
|
208
|
+
this.bQ_();
|
209
209
|
}
|
210
210
|
|
211
211
|
return this;
|
212
212
|
},
|
213
213
|
|
214
|
-
|
215
|
-
var remaining = --this.
|
214
|
+
bO_: function () {
|
215
|
+
var remaining = --this.bE_;
|
216
216
|
|
217
217
|
if (remaining === 0) {
|
218
|
-
var parentOut = this.
|
218
|
+
var parentOut = this.bH_;
|
219
219
|
if (parentOut) {
|
220
|
-
parentOut.
|
220
|
+
parentOut.bO_();
|
221
221
|
} else {
|
222
|
-
this.
|
222
|
+
this.bP_();
|
223
223
|
}
|
224
|
-
} else if (remaining - this.
|
225
|
-
this.
|
224
|
+
} else if (remaining - this.bF_ === 0) {
|
225
|
+
this.bQ_();
|
226
226
|
}
|
227
227
|
},
|
228
228
|
|
229
|
-
|
229
|
+
bP_: function () {
|
230
230
|
var state = this.y_;
|
231
|
-
state.
|
232
|
-
state.
|
231
|
+
state.bD_ = true;
|
232
|
+
state.bB_.emit(EVENT_FINISH, this.br_());
|
233
233
|
},
|
234
234
|
|
235
|
-
|
235
|
+
bQ_: function () {
|
236
236
|
var lastArray = this._last;
|
237
237
|
|
238
238
|
var i = 0;
|
@@ -267,7 +267,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
267
267
|
},
|
268
268
|
|
269
269
|
beginAsync: function (options) {
|
270
|
-
if (this.
|
270
|
+
if (this.bJ_) {
|
271
271
|
throw Error(
|
272
272
|
"Tried to render async while in sync mode. Note: Client side await is not currently supported in re-renders (Issue: #942)."
|
273
273
|
);
|
@@ -277,16 +277,16 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
277
277
|
|
278
278
|
if (options) {
|
279
279
|
if (options.last) {
|
280
|
-
this.
|
280
|
+
this.bF_++;
|
281
281
|
}
|
282
282
|
}
|
283
283
|
|
284
|
-
this.
|
284
|
+
this.bE_++;
|
285
285
|
|
286
|
-
var documentFragment = this._Z_.
|
286
|
+
var documentFragment = this._Z_.bR_();
|
287
287
|
var asyncOut = new AsyncVDOMBuilder(this.global, documentFragment, this);
|
288
288
|
|
289
|
-
state.
|
289
|
+
state.bB_.emit("beginAsync", {
|
290
290
|
out: asyncOut,
|
291
291
|
parentOut: this
|
292
292
|
});
|
@@ -299,7 +299,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
299
299
|
},
|
300
300
|
|
301
301
|
flush: function () {
|
302
|
-
var events = this.y_.
|
302
|
+
var events = this.y_.bB_;
|
303
303
|
|
304
304
|
if (events.listenerCount(EVENT_UPDATE)) {
|
305
305
|
events.emit(EVENT_UPDATE, new RenderResult(this));
|
@@ -307,22 +307,22 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
307
307
|
},
|
308
308
|
|
309
309
|
af_: function () {
|
310
|
-
return this.y_.
|
310
|
+
return this.y_.bC_;
|
311
311
|
},
|
312
312
|
|
313
|
-
|
314
|
-
return this.
|
313
|
+
br_: function () {
|
314
|
+
return this.bS_ || (this.bS_ = new RenderResult(this));
|
315
315
|
},
|
316
316
|
|
317
317
|
on: function (event, callback) {
|
318
318
|
var state = this.y_;
|
319
319
|
|
320
|
-
if (event === EVENT_FINISH && state.
|
321
|
-
callback(this.
|
320
|
+
if (event === EVENT_FINISH && state.bD_) {
|
321
|
+
callback(this.br_());
|
322
322
|
} else if (event === "last") {
|
323
323
|
this.onLast(callback);
|
324
324
|
} else {
|
325
|
-
state.
|
325
|
+
state.bB_.on(event, callback);
|
326
326
|
}
|
327
327
|
|
328
328
|
return this;
|
@@ -331,19 +331,19 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
331
331
|
once: function (event, callback) {
|
332
332
|
var state = this.y_;
|
333
333
|
|
334
|
-
if (event === EVENT_FINISH && state.
|
335
|
-
callback(this.
|
334
|
+
if (event === EVENT_FINISH && state.bD_) {
|
335
|
+
callback(this.br_());
|
336
336
|
} else if (event === "last") {
|
337
337
|
this.onLast(callback);
|
338
338
|
} else {
|
339
|
-
state.
|
339
|
+
state.bB_.once(event, callback);
|
340
340
|
}
|
341
341
|
|
342
342
|
return this;
|
343
343
|
},
|
344
344
|
|
345
345
|
emit: function (type, arg) {
|
346
|
-
var events = this.y_.
|
346
|
+
var events = this.y_.bB_;
|
347
347
|
switch (arguments.length) {
|
348
348
|
case 1:
|
349
349
|
events.emit(type);
|
@@ -359,17 +359,17 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
359
359
|
},
|
360
360
|
|
361
361
|
removeListener: function () {
|
362
|
-
var events = this.y_.
|
362
|
+
var events = this.y_.bB_;
|
363
363
|
events.removeListener.apply(events, arguments);
|
364
364
|
return this;
|
365
365
|
},
|
366
366
|
|
367
367
|
sync: function () {
|
368
|
-
this.
|
368
|
+
this.bJ_ = true;
|
369
369
|
},
|
370
370
|
|
371
371
|
isSync: function () {
|
372
|
-
return this.
|
372
|
+
return this.bJ_;
|
373
373
|
},
|
374
374
|
|
375
375
|
onLast: function (callback) {
|
@@ -385,12 +385,12 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
385
385
|
},
|
386
386
|
|
387
387
|
ae_: function (host) {
|
388
|
-
var node = this.
|
388
|
+
var node = this.bK_;
|
389
389
|
if (!node) {
|
390
390
|
var vdomTree = this.af_();
|
391
391
|
|
392
392
|
if (!host) host = this.A_;
|
393
|
-
this.
|
393
|
+
this.bK_ = node = vdomTree.bl_(host, null);
|
394
394
|
morphdom(node, vdomTree, host, this.b_);
|
395
395
|
}
|
396
396
|
return node;
|
@@ -2,14 +2,14 @@
|
|
2
2
|
var VNode = require("./VNode");
|
3
3
|
|
4
4
|
function VComponent(component, key, ownerComponent, preserve) {
|
5
|
-
this.
|
6
|
-
this.
|
5
|
+
this.bT_(null /* childCount */, ownerComponent);
|
6
|
+
this.bU_ = key;
|
7
7
|
this.r_ = component;
|
8
8
|
this.aa_ = preserve;
|
9
9
|
}
|
10
10
|
|
11
11
|
VComponent.prototype = {
|
12
|
-
|
12
|
+
bV_: 2
|
13
13
|
};
|
14
14
|
|
15
15
|
inherit(VComponent, VNode);
|
@@ -4,25 +4,25 @@ var VNode = require("./VNode");
|
|
4
4
|
|
5
5
|
function VDocumentFragmentClone(other) {
|
6
6
|
extend(this, other);
|
7
|
-
this.
|
8
|
-
this.
|
7
|
+
this.bW_ = null;
|
8
|
+
this.bX_ = null;
|
9
9
|
}
|
10
10
|
|
11
11
|
function VDocumentFragment(out) {
|
12
|
-
this.
|
12
|
+
this.bT_(null /* childCount */);
|
13
13
|
this.q_ = out;
|
14
14
|
}
|
15
15
|
|
16
16
|
VDocumentFragment.prototype = {
|
17
|
-
|
17
|
+
bV_: 11,
|
18
18
|
|
19
|
-
|
19
|
+
bY_: true,
|
20
20
|
|
21
|
-
|
21
|
+
bN_: function () {
|
22
22
|
return new VDocumentFragmentClone(this);
|
23
23
|
},
|
24
24
|
|
25
|
-
|
25
|
+
bl_: function (host) {
|
26
26
|
return (host.ownerDocument || host).createDocumentFragment();
|
27
27
|
}
|
28
28
|
};
|
@@ -81,17 +81,17 @@ function assign(a, b) {
|
|
81
81
|
}
|
82
82
|
|
83
83
|
function VElementClone(other) {
|
84
|
-
this.
|
85
|
-
this.
|
86
|
-
this.
|
84
|
+
this.bZ_ = other.bZ_;
|
85
|
+
this.bW_ = null;
|
86
|
+
this.bX_ = null;
|
87
87
|
|
88
|
-
this.
|
89
|
-
this.
|
88
|
+
this.bU_ = other.bU_;
|
89
|
+
this.c__ = other.c__;
|
90
90
|
this._L_ = other._L_;
|
91
|
-
this.
|
91
|
+
this.ca_ = other.ca_;
|
92
92
|
this.t_ = other.t_;
|
93
|
-
this.
|
94
|
-
this.
|
93
|
+
this.cb_ = other.cb_;
|
94
|
+
this.cc_ = other.cc_;
|
95
95
|
}
|
96
96
|
|
97
97
|
function VElement(
|
@@ -103,7 +103,7 @@ childCount,
|
|
103
103
|
flags,
|
104
104
|
props)
|
105
105
|
{
|
106
|
-
this.
|
106
|
+
this.bT_(childCount, ownerComponent);
|
107
107
|
|
108
108
|
var constId;
|
109
109
|
|
@@ -111,21 +111,21 @@ props)
|
|
111
111
|
constId = props.i;
|
112
112
|
}
|
113
113
|
|
114
|
-
this.
|
114
|
+
this.bU_ = key;
|
115
115
|
this.t_ = flags || 0;
|
116
|
-
this.
|
116
|
+
this.c__ = attrs || EMPTY_OBJECT;
|
117
117
|
this._L_ = props || EMPTY_OBJECT;
|
118
|
-
this.
|
119
|
-
this.
|
120
|
-
this.
|
118
|
+
this.ca_ = tagName;
|
119
|
+
this.cb_ = "";
|
120
|
+
this.cc_ = constId;
|
121
121
|
this.aa_ = false;
|
122
122
|
this.a__ = false;
|
123
123
|
}
|
124
124
|
|
125
125
|
VElement.prototype = {
|
126
|
-
|
126
|
+
bV_: 1,
|
127
127
|
|
128
|
-
|
128
|
+
bN_: function () {
|
129
129
|
return new VElementClone(this);
|
130
130
|
},
|
131
131
|
|
@@ -137,7 +137,7 @@ VElement.prototype = {
|
|
137
137
|
* @param {int|null} childCount The number of child nodes (or `null` if not known)
|
138
138
|
*/
|
139
139
|
e: function (tagName, attrs, key, ownerComponent, childCount, flags, props) {
|
140
|
-
var child = this.
|
140
|
+
var child = this.bM_(
|
141
141
|
new VElement(
|
142
142
|
tagName,
|
143
143
|
attrs,
|
@@ -150,7 +150,7 @@ VElement.prototype = {
|
|
150
150
|
);
|
151
151
|
|
152
152
|
if (childCount === 0) {
|
153
|
-
return this.
|
153
|
+
return this.cd_();
|
154
154
|
} else {
|
155
155
|
return child;
|
156
156
|
}
|
@@ -163,15 +163,15 @@ VElement.prototype = {
|
|
163
163
|
* @param {String} value The value for the new Comment node
|
164
164
|
*/
|
165
165
|
n: function (node, ownerComponent) {
|
166
|
-
node = node.
|
166
|
+
node = node.bN_();
|
167
167
|
node._J_ = ownerComponent;
|
168
|
-
this.
|
169
|
-
return this.
|
168
|
+
this.bM_(node);
|
169
|
+
return this.cd_();
|
170
170
|
},
|
171
171
|
|
172
|
-
|
173
|
-
var tagName = this.
|
174
|
-
var attributes = this.
|
172
|
+
bl_: function (host, parentNamespaceURI) {
|
173
|
+
var tagName = this.ca_;
|
174
|
+
var attributes = this.c__;
|
175
175
|
var namespaceURI = DEFAULT_NS[tagName] || parentNamespaceURI || NS_HTML;
|
176
176
|
|
177
177
|
var flags = this.t_;
|
@@ -196,7 +196,7 @@ VElement.prototype = {
|
|
196
196
|
}
|
197
197
|
|
198
198
|
if (tagName === "textarea") {
|
199
|
-
el.defaultValue = this.
|
199
|
+
el.defaultValue = this.cb_;
|
200
200
|
}
|
201
201
|
}
|
202
202
|
|
@@ -205,11 +205,11 @@ VElement.prototype = {
|
|
205
205
|
return el;
|
206
206
|
},
|
207
207
|
|
208
|
-
|
208
|
+
ce_: function (name) {
|
209
209
|
// We don't care about the namespaces since the there
|
210
210
|
// is no chance that attributes with the same name will have
|
211
211
|
// different namespaces
|
212
|
-
var value = this.
|
212
|
+
var value = this.c__[name];
|
213
213
|
return value != null && value !== false;
|
214
214
|
}
|
215
215
|
};
|
@@ -258,8 +258,8 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
|
|
258
258
|
props
|
259
259
|
);
|
260
260
|
|
261
|
-
if (vdomEl.
|
262
|
-
vdomEl.
|
261
|
+
if (vdomEl.ca_ === "textarea") {
|
262
|
+
vdomEl.cb_ = node.value;
|
263
263
|
} else if (virtualizeChildNodes) {
|
264
264
|
virtualizeChildNodes(node, vdomEl, ownerComponent);
|
265
265
|
}
|
@@ -267,12 +267,12 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
|
|
267
267
|
return vdomEl;
|
268
268
|
}
|
269
269
|
|
270
|
-
VElement.
|
270
|
+
VElement.cf_ = virtualizeElement;
|
271
271
|
|
272
|
-
VElement.
|
272
|
+
VElement.cg_ = function (fromEl, vFromEl, toEl) {
|
273
273
|
var fromFlags = vFromEl.t_;
|
274
274
|
var toFlags = toEl.t_;
|
275
|
-
var attrs = toEl.
|
275
|
+
var attrs = toEl.c__;
|
276
276
|
|
277
277
|
if (toFlags & FLAG_CUSTOM_ELEMENT) {
|
278
278
|
return assign(fromEl, attrs);
|
@@ -289,7 +289,7 @@ VElement.cn_ = function (fromEl, vFromEl, toEl) {
|
|
289
289
|
// real VElement node will not have the expando property
|
290
290
|
// so we build the attribute map from the expando property
|
291
291
|
|
292
|
-
var oldAttrs = vFromEl.
|
292
|
+
var oldAttrs = vFromEl.c__;
|
293
293
|
|
294
294
|
if (oldAttrs === attrs) {
|
295
295
|
// For constant attributes the same object will be provided
|
@@ -315,7 +315,7 @@ VElement.cn_ = function (fromEl, vFromEl, toEl) {
|
|
315
315
|
}
|
316
316
|
|
317
317
|
var preserve = props && props.pa || EMPTY_OBJECT;
|
318
|
-
var specialAttrs = specialElHandlers[toEl.
|
318
|
+
var specialAttrs = specialElHandlers[toEl.ca_] || EMPTY_OBJECT;
|
319
319
|
var specialAttr;
|
320
320
|
|
321
321
|
// Loop over all of the attributes in the attribute map and compare
|
@@ -353,7 +353,7 @@ VElement.cn_ = function (fromEl, vFromEl, toEl) {
|
|
353
353
|
// was not a virtualized node (i.e., a node that was not rendered by a
|
354
354
|
// Marko template, but rather a node that was created from an HTML
|
355
355
|
// string or a real DOM node).
|
356
|
-
if (toEl.
|
356
|
+
if (toEl.bU_ === null || fromFlags & FLAG_SPREAD_ATTRS) {
|
357
357
|
for (attrName in oldAttrs) {
|
358
358
|
if (!(attrName in attrs)) {
|
359
359
|
if (specialAttr = specialAttrs[attrName]) {
|
@@ -6,16 +6,16 @@ var createFragmentNode = require("./morphdom/fragment")._h_;
|
|
6
6
|
var VNode = require("./VNode");
|
7
7
|
|
8
8
|
function VFragment(key, ownerComponent, preserve) {
|
9
|
-
this.
|
10
|
-
this.
|
9
|
+
this.bT_(null /* childCount */, ownerComponent);
|
10
|
+
this.bU_ = key;
|
11
11
|
this.aa_ = preserve;
|
12
12
|
}
|
13
13
|
|
14
14
|
VFragment.prototype = {
|
15
|
-
|
16
|
-
|
15
|
+
bV_: 12,
|
16
|
+
bl_: function () {
|
17
17
|
var fragment = createFragmentNode();
|
18
|
-
keysByDOMNode.set(fragment, this.
|
18
|
+
keysByDOMNode.set(fragment, this.bU_);
|
19
19
|
vElementByDOMNode.set(fragment, this);
|
20
20
|
return fragment;
|
21
21
|
}
|
@@ -2,78 +2,78 @@
|
|
2
2
|
function VNode() {}
|
3
3
|
|
4
4
|
VNode.prototype = {
|
5
|
-
|
6
|
-
this.
|
7
|
-
this.
|
8
|
-
this.
|
9
|
-
this.
|
10
|
-
this.
|
11
|
-
this.
|
5
|
+
bT_: function (finalChildCount, ownerComponent) {
|
6
|
+
this.ch_ = finalChildCount;
|
7
|
+
this.ci_ = 0;
|
8
|
+
this.bZ_ = null;
|
9
|
+
this.cj_ = null;
|
10
|
+
this.bW_ = null;
|
11
|
+
this.bX_ = null;
|
12
12
|
this._J_ = ownerComponent;
|
13
13
|
},
|
14
14
|
|
15
15
|
get ay_() {
|
16
|
-
var firstChild = this.
|
16
|
+
var firstChild = this.bZ_;
|
17
17
|
|
18
|
-
if (firstChild && firstChild.
|
18
|
+
if (firstChild && firstChild.bY_) {
|
19
19
|
var nestedFirstChild = firstChild.ay_;
|
20
20
|
// The first child is a DocumentFragment node.
|
21
21
|
// If the DocumentFragment node has a first child then we will return that.
|
22
22
|
// Otherwise, the DocumentFragment node is not *really* the first child and
|
23
23
|
// we need to skip to its next sibling
|
24
|
-
return nestedFirstChild || firstChild.
|
24
|
+
return nestedFirstChild || firstChild.ck_;
|
25
25
|
}
|
26
26
|
|
27
27
|
return firstChild;
|
28
28
|
},
|
29
29
|
|
30
|
-
get
|
31
|
-
var nextSibling = this.
|
30
|
+
get ck_() {
|
31
|
+
var nextSibling = this.bX_;
|
32
32
|
|
33
33
|
if (nextSibling) {
|
34
|
-
if (nextSibling.
|
34
|
+
if (nextSibling.bY_) {
|
35
35
|
var firstChild = nextSibling.ay_;
|
36
|
-
return firstChild || nextSibling.
|
36
|
+
return firstChild || nextSibling.ck_;
|
37
37
|
}
|
38
38
|
} else {
|
39
|
-
var parentNode = this.
|
40
|
-
if (parentNode && parentNode.
|
41
|
-
return parentNode.
|
39
|
+
var parentNode = this.bW_;
|
40
|
+
if (parentNode && parentNode.bY_) {
|
41
|
+
return parentNode.ck_;
|
42
42
|
}
|
43
43
|
}
|
44
44
|
|
45
45
|
return nextSibling;
|
46
46
|
},
|
47
47
|
|
48
|
-
|
49
|
-
this.
|
48
|
+
bM_: function (child) {
|
49
|
+
this.ci_++;
|
50
50
|
|
51
|
-
if (this.
|
52
|
-
if (child.
|
53
|
-
this.
|
51
|
+
if (this.ca_ === "textarea") {
|
52
|
+
if (child.cl_) {
|
53
|
+
this.cb_ += child.cm_;
|
54
54
|
} else {
|
55
55
|
throw TypeError();
|
56
56
|
}
|
57
57
|
} else {
|
58
|
-
var lastChild = this.
|
58
|
+
var lastChild = this.cj_;
|
59
59
|
|
60
|
-
child.
|
60
|
+
child.bW_ = this;
|
61
61
|
|
62
62
|
if (lastChild) {
|
63
|
-
lastChild.
|
63
|
+
lastChild.bX_ = child;
|
64
64
|
} else {
|
65
|
-
this.
|
65
|
+
this.bZ_ = child;
|
66
66
|
}
|
67
67
|
|
68
|
-
this.
|
68
|
+
this.cj_ = child;
|
69
69
|
}
|
70
70
|
|
71
71
|
return child;
|
72
72
|
},
|
73
73
|
|
74
|
-
|
75
|
-
if (this.
|
76
|
-
return this.
|
74
|
+
cd_: function finishChild() {
|
75
|
+
if (this.ci_ === this.ch_ && this.bW_) {
|
76
|
+
return this.bW_.cd_();
|
77
77
|
} else {
|
78
78
|
return this;
|
79
79
|
}
|