marko 5.17.6 → 5.17.10
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/components/update-manager.js +7 -7
- package/dist/runtime/components/update-manager.js.map +1 -1
- package/dist/runtime/components/util/index-browser.js +4 -4
- package/dist/runtime/components/util/index.js +1 -1
- package/dist/runtime/createOut.js +1 -1
- package/dist/runtime/dom-insert.js +4 -4
- package/dist/runtime/helpers/_change-case.js +2 -2
- package/dist/runtime/helpers/dynamic-tag.js +4 -4
- package/dist/runtime/helpers/style-value.js +1 -1
- package/dist/runtime/html/AsyncStream.js +12 -12
- package/dist/runtime/html/BufferedWriter.js +5 -1
- package/dist/runtime/html/BufferedWriter.js.map +1 -1
- package/dist/runtime/html/StringWriter.js +1 -1
- package/dist/runtime/html/create-readable/index-browser.js +12 -6
- package/dist/runtime/html/create-readable/index-browser.js.map +1 -1
- package/dist/runtime/html/create-readable/index.js +9 -9
- package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
- package/dist/runtime/html/helpers/attr.js +4 -4
- package/dist/runtime/html/helpers/data-marko.js +2 -2
- package/dist/runtime/html/helpers/escape-quotes.js +2 -2
- package/dist/runtime/html/helpers/escape-xml.js +1 -1
- package/dist/runtime/html/helpers/props-script.js +1 -1
- package/dist/runtime/html/index.js +2 -2
- package/dist/runtime/renderable.js +5 -5
- package/dist/runtime/renderable.js.map +1 -1
- package/dist/runtime/setImmediate/index-browser.js +1 -1
- package/dist/runtime/setImmediate/index-browser.js.map +1 -1
- package/dist/runtime/setImmediate/index-worker.js +2 -16
- package/dist/runtime/setImmediate/index-worker.js.map +1 -1
- package/dist/runtime/setImmediate/index.js +2 -1
- package/dist/runtime/setImmediate/index.js.map +1 -1
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +71 -71
- package/dist/runtime/vdom/VComponent.js +3 -3
- package/dist/runtime/vdom/VDocumentFragment.js +7 -7
- package/dist/runtime/vdom/VElement.js +43 -43
- package/dist/runtime/vdom/VFragment.js +5 -5
- package/dist/runtime/vdom/VNode.js +32 -32
- package/dist/runtime/vdom/VText.js +8 -8
- package/dist/runtime/vdom/helpers/v-element.js +1 -1
- package/dist/runtime/vdom/helpers/v-text.js +1 -1
- package/dist/runtime/vdom/hot-reload.js +5 -5
- package/dist/runtime/vdom/index.js +2 -2
- package/dist/runtime/vdom/morphdom/fragment.js +4 -4
- package/dist/runtime/vdom/morphdom/helpers.js +4 -4
- package/dist/runtime/vdom/morphdom/index.js +36 -36
- package/dist/runtime/vdom/morphdom/specialElHandlers.js +6 -6
- package/dist/runtime/vdom/preserve-attrs.js +1 -1
- package/dist/runtime/vdom/vdom.js +14 -14
- package/package.json +4 -4
- package/src/runtime/components/update-manager.js +1 -1
- package/src/runtime/html/BufferedWriter.js +5 -1
- package/src/runtime/html/create-readable/index-browser.js +15 -9
- package/src/runtime/renderable.js +1 -1
- package/src/runtime/setImmediate/index-browser.js +1 -1
- package/src/runtime/setImmediate/index-worker.js +2 -16
- package/src/runtime/setImmediate/index.js +2 -1
@@ -1,17 +1,3 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
|
4
|
-
channel.port1.onmessage = function () {
|
5
|
-
var callbacks = queue;
|
6
|
-
queue = [];
|
7
|
-
for (var i = 0; i < callbacks.length; i++) {
|
8
|
-
callbacks[i]();
|
9
|
-
}
|
10
|
-
};
|
11
|
-
|
12
|
-
module.exports = function (cb) {
|
13
|
-
if (queue.push(cb) === 1) {
|
14
|
-
channel.port2.postMessage(0);
|
15
|
-
}
|
16
|
-
};
|
1
|
+
"use strict";exports.az_ = setTimeout;
|
2
|
+
exports.aS_ = clearTimeout;
|
17
3
|
//# sourceMappingURL=index-worker.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/runtime/setImmediate/index-worker.js"],"names":["
|
1
|
+
{"version":3,"sources":["../../../src/runtime/setImmediate/index-worker.js"],"names":["exports","setTimeout","clearTimeout"],"mappings":"aAAAA,OAAO,IAAP,GAA0BC,UAA1B;AACAD,OAAO,IAAP,GAA4BE,YAA5B","sourcesContent":["exports.___setImmediate = setTimeout;\nexports.___clearImmediate = clearTimeout;\n"],"file":"index-worker.js"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/runtime/setImmediate/index.js"],"names":["
|
1
|
+
{"version":3,"sources":["../../../src/runtime/setImmediate/index.js"],"names":["exports","setImmediate","clearImmediate"],"mappings":"aAAAA,OAAO,IAAP,GAA0BC,YAA1B;AACAD,OAAO,IAAP,GAA4BE,cAA5B","sourcesContent":["exports.___setImmediate = setImmediate;\nexports.___clearImmediate = clearImmediate;\n"],"file":"index.js"}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
"use strict";var EventEmitter = require("events-light");
|
2
2
|
var vdom = require("./vdom");
|
3
|
-
var VElement = vdom.
|
4
|
-
var VDocumentFragment = vdom.
|
5
|
-
var VText = vdom.
|
6
|
-
var VComponent = vdom.
|
7
|
-
var VFragment = vdom.
|
8
|
-
var virtualizeHTML = vdom.
|
3
|
+
var VElement = vdom.bb_;
|
4
|
+
var VDocumentFragment = vdom.bc_;
|
5
|
+
var VText = vdom.bd_;
|
6
|
+
var VComponent = vdom.be_;
|
7
|
+
var VFragment = vdom.bf_;
|
8
|
+
var virtualizeHTML = vdom.bg_;
|
9
9
|
var RenderResult = require("../RenderResult");
|
10
10
|
var morphdom = require("./morphdom");
|
11
11
|
var attrsHelper = require("./helpers/attrs");
|
@@ -14,9 +14,9 @@ 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.bh_ = new EventEmitter();
|
18
|
+
this.bi_ = tree;
|
19
|
+
this.bj_ = 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.bk_ = 1;
|
36
|
+
this.bl_ = 0;
|
37
|
+
this.bm_ = null;
|
38
|
+
this.bn_ = parentOut;
|
39
39
|
|
40
40
|
this.data = {};
|
41
41
|
this.J_ = state;
|
42
42
|
this.l_ = parentNode;
|
43
43
|
this.global = globalData || {};
|
44
|
-
this.
|
45
|
-
this.
|
46
|
-
this.
|
44
|
+
this.bo_ = [parentNode];
|
45
|
+
this.bp_ = false;
|
46
|
+
this.bq_ = undefined;
|
47
47
|
this.b_ = null;
|
48
48
|
|
49
49
|
this.g_ = null;
|
@@ -52,23 +52,23 @@ function AsyncVDOMBuilder(globalData, parentNode, parentOut) {
|
|
52
52
|
}
|
53
53
|
|
54
54
|
var proto = AsyncVDOMBuilder.prototype = {
|
55
|
-
|
55
|
+
aQ_: true,
|
56
56
|
X_: typeof window === "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.br_(vComponent, 0, true);
|
61
61
|
},
|
62
62
|
|
63
63
|
ay_: function (component, key, ownerComponent) {
|
64
64
|
var vComponent = new VComponent(component, key, ownerComponent, true);
|
65
|
-
this.
|
65
|
+
this.br_(vComponent, 0);
|
66
66
|
},
|
67
67
|
|
68
|
-
|
69
|
-
this.l_.
|
68
|
+
br_: function (child, childCount, pushToStack) {
|
69
|
+
this.l_.bs_(child);
|
70
70
|
if (pushToStack === true) {
|
71
|
-
this.
|
71
|
+
this.bo_.push(child);
|
72
72
|
this.l_ = child;
|
73
73
|
}
|
74
74
|
return childCount === 0 ? this : child;
|
@@ -84,10 +84,10 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
84
84
|
flags,
|
85
85
|
props);
|
86
86
|
|
87
|
-
return this.
|
87
|
+
return this.br_(element, childCount);
|
88
88
|
},
|
89
89
|
|
90
|
-
|
90
|
+
aN_: function (tagName, attrs, key, componentDef, props) {
|
91
91
|
return this.element(
|
92
92
|
tagName,
|
93
93
|
attrsHelper(attrs),
|
@@ -102,15 +102,15 @@ 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.bt_();
|
106
106
|
this.node(clone);
|
107
|
-
clone.
|
107
|
+
clone.aB_ = component;
|
108
108
|
|
109
109
|
return this;
|
110
110
|
},
|
111
111
|
|
112
112
|
node: function (node) {
|
113
|
-
this.l_.
|
113
|
+
this.l_.bs_(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.l_.
|
132
|
+
this.l_.bs_(new VText(text, ownerComponent));
|
133
133
|
return this;
|
134
134
|
},
|
135
135
|
|
@@ -160,11 +160,11 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
160
160
|
flags,
|
161
161
|
props);
|
162
162
|
|
163
|
-
this.
|
163
|
+
this.br_(element, childCount, true);
|
164
164
|
return this;
|
165
165
|
},
|
166
166
|
|
167
|
-
|
167
|
+
aL_: function (tagName, attrs, key, componentDef, props) {
|
168
168
|
return this.beginElement(
|
169
169
|
tagName,
|
170
170
|
attrsHelper(attrs),
|
@@ -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.br_(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.bo_;
|
191
191
|
stack.pop();
|
192
192
|
this.l_ = stack[stack.length - 1];
|
193
193
|
},
|
@@ -195,44 +195,44 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
195
195
|
end: function () {
|
196
196
|
this.l_ = undefined;
|
197
197
|
|
198
|
-
var remaining = --this.
|
199
|
-
var parentOut = this.
|
198
|
+
var remaining = --this.bk_;
|
199
|
+
var parentOut = this.bn_;
|
200
200
|
|
201
201
|
if (remaining === 0) {
|
202
202
|
if (parentOut) {
|
203
|
-
parentOut.
|
203
|
+
parentOut.bu_();
|
204
204
|
} else {
|
205
|
-
this.
|
205
|
+
this.bv_();
|
206
206
|
}
|
207
|
-
} else if (remaining - this.
|
208
|
-
this.
|
207
|
+
} else if (remaining - this.bl_ === 0) {
|
208
|
+
this.bw_();
|
209
209
|
}
|
210
210
|
|
211
211
|
return this;
|
212
212
|
},
|
213
213
|
|
214
|
-
|
215
|
-
var remaining = --this.
|
214
|
+
bu_: function () {
|
215
|
+
var remaining = --this.bk_;
|
216
216
|
|
217
217
|
if (remaining === 0) {
|
218
|
-
var parentOut = this.
|
218
|
+
var parentOut = this.bn_;
|
219
219
|
if (parentOut) {
|
220
|
-
parentOut.
|
220
|
+
parentOut.bu_();
|
221
221
|
} else {
|
222
|
-
this.
|
222
|
+
this.bv_();
|
223
223
|
}
|
224
|
-
} else if (remaining - this.
|
225
|
-
this.
|
224
|
+
} else if (remaining - this.bl_ === 0) {
|
225
|
+
this.bw_();
|
226
226
|
}
|
227
227
|
},
|
228
228
|
|
229
|
-
|
229
|
+
bv_: function () {
|
230
230
|
var state = this.J_;
|
231
|
-
state.
|
232
|
-
state.
|
231
|
+
state.bj_ = true;
|
232
|
+
state.bh_.emit(EVENT_FINISH, this.aR_());
|
233
233
|
},
|
234
234
|
|
235
|
-
|
235
|
+
bw_: 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.bp_) {
|
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.bl_++;
|
281
281
|
}
|
282
282
|
}
|
283
283
|
|
284
|
-
this.
|
284
|
+
this.bk_++;
|
285
285
|
|
286
|
-
var documentFragment = this.l_.
|
286
|
+
var documentFragment = this.l_.bx_();
|
287
287
|
var asyncOut = new AsyncVDOMBuilder(this.global, documentFragment, this);
|
288
288
|
|
289
|
-
state.
|
289
|
+
state.bh_.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.J_.
|
302
|
+
var events = this.J_.bh_;
|
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
|
B_: function () {
|
310
|
-
return this.J_.
|
310
|
+
return this.J_.bi_;
|
311
311
|
},
|
312
312
|
|
313
|
-
|
314
|
-
return this.
|
313
|
+
aR_: function () {
|
314
|
+
return this.by_ || (this.by_ = new RenderResult(this));
|
315
315
|
},
|
316
316
|
|
317
317
|
on: function (event, callback) {
|
318
318
|
var state = this.J_;
|
319
319
|
|
320
|
-
if (event === EVENT_FINISH && state.
|
321
|
-
callback(this.
|
320
|
+
if (event === EVENT_FINISH && state.bj_) {
|
321
|
+
callback(this.aR_());
|
322
322
|
} else if (event === "last") {
|
323
323
|
this.onLast(callback);
|
324
324
|
} else {
|
325
|
-
state.
|
325
|
+
state.bh_.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.J_;
|
333
333
|
|
334
|
-
if (event === EVENT_FINISH && state.
|
335
|
-
callback(this.
|
334
|
+
if (event === EVENT_FINISH && state.bj_) {
|
335
|
+
callback(this.aR_());
|
336
336
|
} else if (event === "last") {
|
337
337
|
this.onLast(callback);
|
338
338
|
} else {
|
339
|
-
state.
|
339
|
+
state.bh_.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.J_.
|
346
|
+
var events = this.J_.bh_;
|
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.J_.
|
362
|
+
var events = this.J_.bh_;
|
363
363
|
events.removeListener.apply(events, arguments);
|
364
364
|
return this;
|
365
365
|
},
|
366
366
|
|
367
367
|
sync: function () {
|
368
|
-
this.
|
368
|
+
this.bp_ = true;
|
369
369
|
},
|
370
370
|
|
371
371
|
isSync: function () {
|
372
|
-
return this.
|
372
|
+
return this.bp_;
|
373
373
|
},
|
374
374
|
|
375
375
|
onLast: function (callback) {
|
@@ -385,12 +385,12 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
385
385
|
},
|
386
386
|
|
387
387
|
A_: function (host) {
|
388
|
-
var node = this.
|
388
|
+
var node = this.bq_;
|
389
389
|
if (!node) {
|
390
390
|
var vdomTree = this.B_();
|
391
391
|
|
392
392
|
if (!host) host = this.X_;
|
393
|
-
this.
|
393
|
+
this.bq_ = node = vdomTree.bz_(host, null);
|
394
394
|
morphdom(node, vdomTree, host, this.b_);
|
395
395
|
}
|
396
396
|
return node;
|
@@ -443,7 +443,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
443
443
|
|
444
444
|
proto.e = proto.element;
|
445
445
|
proto.be = proto.beginElement;
|
446
|
-
proto.ee = proto.
|
446
|
+
proto.ee = proto.aM_ = proto.endElement;
|
447
447
|
proto.t = proto.text;
|
448
448
|
proto.h = proto.w = proto.write = proto.html;
|
449
449
|
|
@@ -2,14 +2,14 @@
|
|
2
2
|
var inherit = require("raptor-util/inherit");
|
3
3
|
|
4
4
|
function VComponent(component, key, ownerComponent, preserve) {
|
5
|
-
this.
|
6
|
-
this.
|
5
|
+
this.bA_(null /* childCount */, ownerComponent);
|
6
|
+
this.bB_ = key;
|
7
7
|
this.h_ = component;
|
8
8
|
this.n_ = preserve;
|
9
9
|
}
|
10
10
|
|
11
11
|
VComponent.prototype = {
|
12
|
-
|
12
|
+
bC_: 2 };
|
13
13
|
|
14
14
|
|
15
15
|
inherit(VComponent, VNode);
|
@@ -4,25 +4,25 @@ var extend = require("raptor-util/extend");
|
|
4
4
|
|
5
5
|
function VDocumentFragmentClone(other) {
|
6
6
|
extend(this, other);
|
7
|
-
this.
|
8
|
-
this.
|
7
|
+
this.bD_ = null;
|
8
|
+
this.bE_ = null;
|
9
9
|
}
|
10
10
|
|
11
11
|
function VDocumentFragment(out) {
|
12
|
-
this.
|
12
|
+
this.bA_(null /* childCount */);
|
13
13
|
this.y_ = out;
|
14
14
|
}
|
15
15
|
|
16
16
|
VDocumentFragment.prototype = {
|
17
|
-
|
17
|
+
bC_: 11,
|
18
18
|
|
19
|
-
|
19
|
+
bF_: true,
|
20
20
|
|
21
|
-
|
21
|
+
bt_: function () {
|
22
22
|
return new VDocumentFragmentClone(this);
|
23
23
|
},
|
24
24
|
|
25
|
-
|
25
|
+
bz_: function (host) {
|
26
26
|
return (host.ownerDocument || host).createDocumentFragment();
|
27
27
|
} };
|
28
28
|
|
@@ -63,17 +63,17 @@ function removeAttribute(el, namespaceURI, name) {
|
|
63
63
|
}
|
64
64
|
|
65
65
|
function VElementClone(other) {
|
66
|
-
this.bE_ = other.bE_;
|
67
|
-
this.bB_ = null;
|
68
|
-
this.bC_ = null;
|
69
|
-
|
70
|
-
this.bz_ = other.bz_;
|
71
|
-
this.bF_ = other.bF_;
|
72
|
-
this.aB_ = other.aB_;
|
73
66
|
this.bG_ = other.bG_;
|
74
|
-
this.
|
67
|
+
this.bD_ = null;
|
68
|
+
this.bE_ = null;
|
69
|
+
|
70
|
+
this.bB_ = other.bB_;
|
75
71
|
this.bH_ = other.bH_;
|
72
|
+
this.aC_ = other.aC_;
|
76
73
|
this.bI_ = other.bI_;
|
74
|
+
this._I_ = other._I_;
|
75
|
+
this.bJ_ = other.bJ_;
|
76
|
+
this.bK_ = other.bK_;
|
77
77
|
}
|
78
78
|
|
79
79
|
function VElement(
|
@@ -85,7 +85,7 @@ childCount,
|
|
85
85
|
flags,
|
86
86
|
props)
|
87
87
|
{
|
88
|
-
this.
|
88
|
+
this.bA_(childCount, ownerComponent);
|
89
89
|
|
90
90
|
var constId;
|
91
91
|
|
@@ -93,21 +93,21 @@ props)
|
|
93
93
|
constId = props.i;
|
94
94
|
}
|
95
95
|
|
96
|
-
this.
|
96
|
+
this.bB_ = key;
|
97
97
|
this._I_ = flags || 0;
|
98
|
-
this.
|
99
|
-
this.
|
100
|
-
this.
|
101
|
-
this.
|
102
|
-
this.
|
98
|
+
this.bH_ = attrs || EMPTY_OBJECT;
|
99
|
+
this.aC_ = props || EMPTY_OBJECT;
|
100
|
+
this.bI_ = tagName;
|
101
|
+
this.bJ_ = null;
|
102
|
+
this.bK_ = constId;
|
103
103
|
this.n_ = false;
|
104
104
|
this.m_ = false;
|
105
105
|
}
|
106
106
|
|
107
107
|
VElement.prototype = {
|
108
|
-
|
108
|
+
bC_: 1,
|
109
109
|
|
110
|
-
|
110
|
+
bt_: function () {
|
111
111
|
return new VElementClone(this);
|
112
112
|
},
|
113
113
|
|
@@ -119,7 +119,7 @@ VElement.prototype = {
|
|
119
119
|
* @param {int|null} childCount The number of child nodes (or `null` if not known)
|
120
120
|
*/
|
121
121
|
e: function (tagName, attrs, key, ownerComponent, childCount, flags, props) {
|
122
|
-
var child = this.
|
122
|
+
var child = this.bs_(
|
123
123
|
new VElement(
|
124
124
|
tagName,
|
125
125
|
attrs,
|
@@ -132,7 +132,7 @@ VElement.prototype = {
|
|
132
132
|
|
133
133
|
|
134
134
|
if (childCount === 0) {
|
135
|
-
return this.
|
135
|
+
return this.bL_();
|
136
136
|
} else {
|
137
137
|
return child;
|
138
138
|
}
|
@@ -145,15 +145,15 @@ VElement.prototype = {
|
|
145
145
|
* @param {String} value The value for the new Comment node
|
146
146
|
*/
|
147
147
|
n: function (node, ownerComponent) {
|
148
|
-
node = node.
|
149
|
-
node.
|
150
|
-
this.
|
151
|
-
return this.
|
148
|
+
node = node.bt_();
|
149
|
+
node.aB_ = ownerComponent;
|
150
|
+
this.bs_(node);
|
151
|
+
return this.bL_();
|
152
152
|
},
|
153
153
|
|
154
|
-
|
155
|
-
var tagName = this.
|
156
|
-
var attributes = this.
|
154
|
+
bz_: function (host, parentNamespaceURI) {
|
155
|
+
var tagName = this.bI_;
|
156
|
+
var attributes = this.bH_;
|
157
157
|
var namespaceURI = DEFAULT_NS[tagName] || parentNamespaceURI || NS_HTML;
|
158
158
|
|
159
159
|
var flags = this._I_;
|
@@ -195,11 +195,11 @@ VElement.prototype = {
|
|
195
195
|
return el;
|
196
196
|
},
|
197
197
|
|
198
|
-
|
198
|
+
bM_: function (name) {
|
199
199
|
// We don't care about the namespaces since the there
|
200
200
|
// is no chance that attributes with the same name will have
|
201
201
|
// different namespaces
|
202
|
-
var value = this.
|
202
|
+
var value = this.bH_[name];
|
203
203
|
return value != null && value !== false;
|
204
204
|
} };
|
205
205
|
|
@@ -211,7 +211,7 @@ var proto = VElementClone.prototype = VElement.prototype;
|
|
211
211
|
["checked", "selected", "disabled"].forEach(function (name) {
|
212
212
|
defineProperty(proto, name, {
|
213
213
|
get: function () {
|
214
|
-
var value = this.
|
214
|
+
var value = this.bH_[name];
|
215
215
|
return value !== false && value != null;
|
216
216
|
} });
|
217
217
|
|
@@ -219,20 +219,20 @@ var proto = VElementClone.prototype = VElement.prototype;
|
|
219
219
|
|
220
220
|
defineProperty(proto, "q_", {
|
221
221
|
get: function () {
|
222
|
-
var value = this.
|
222
|
+
var value = this.bJ_;
|
223
223
|
if (value == null) {
|
224
|
-
value = this.
|
224
|
+
value = this.bH_.value;
|
225
225
|
}
|
226
226
|
return value != null && value !== false ?
|
227
227
|
value + "" :
|
228
|
-
this.
|
229
|
-
this.
|
228
|
+
this.bH_.type === "checkbox" ||
|
229
|
+
this.bH_.type === "radio" ?
|
230
230
|
"on" :
|
231
231
|
"";
|
232
232
|
} });
|
233
233
|
|
234
234
|
|
235
|
-
VElement.
|
235
|
+
VElement.bN_ = function (attrs) {
|
236
236
|
// By default this static method is a no-op, but if there are any
|
237
237
|
// compiled components that have "no-update" attributes then
|
238
238
|
// `preserve-attrs.js` will be imported and this method will be replaced
|
@@ -280,8 +280,8 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
|
|
280
280
|
props);
|
281
281
|
|
282
282
|
|
283
|
-
if (vdomEl.
|
284
|
-
vdomEl.
|
283
|
+
if (vdomEl.bI_ === "textarea") {
|
284
|
+
vdomEl.bJ_ = node.value;
|
285
285
|
} else if (virtualizeChildNodes) {
|
286
286
|
virtualizeChildNodes(node, vdomEl, ownerComponent);
|
287
287
|
}
|
@@ -289,18 +289,18 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
|
|
289
289
|
return vdomEl;
|
290
290
|
}
|
291
291
|
|
292
|
-
VElement.
|
292
|
+
VElement.bO_ = virtualizeElement;
|
293
293
|
|
294
|
-
VElement.
|
295
|
-
var removePreservedAttributes = VElement.
|
294
|
+
VElement.bP_ = function (fromEl, vFromEl, toEl) {
|
295
|
+
var removePreservedAttributes = VElement.bN_;
|
296
296
|
|
297
297
|
var fromFlags = vFromEl._I_;
|
298
298
|
var toFlags = toEl._I_;
|
299
299
|
|
300
300
|
vElementByDOMNode.set(fromEl, toEl);
|
301
301
|
|
302
|
-
var attrs = toEl.
|
303
|
-
var props = toEl.
|
302
|
+
var attrs = toEl.bH_;
|
303
|
+
var props = toEl.aC_;
|
304
304
|
|
305
305
|
if (toFlags & FLAG_CUSTOM_ELEMENT) {
|
306
306
|
return assign(fromEl, attrs);
|
@@ -316,7 +316,7 @@ VElement.bN_ = function (fromEl, vFromEl, toEl) {
|
|
316
316
|
// real VElement node will not have the expando property
|
317
317
|
// so we build the attribute map from the expando property
|
318
318
|
|
319
|
-
var oldAttrs = vFromEl.
|
319
|
+
var oldAttrs = vFromEl.bH_;
|
320
320
|
|
321
321
|
if (oldAttrs) {
|
322
322
|
if (oldAttrs === attrs) {
|
@@ -388,7 +388,7 @@ VElement.bN_ = function (fromEl, vFromEl, toEl) {
|
|
388
388
|
// was not a virtualized node (i.e., a node that was not rendered by a
|
389
389
|
// Marko template, but rather a node that was created from an HTML
|
390
390
|
// string or a real DOM node).
|
391
|
-
if (toEl.
|
391
|
+
if (toEl.bB_ === null || fromFlags & FLAG_SPREAD_ATTRS) {
|
392
392
|
for (attrName in oldAttrs) {
|
393
393
|
if (!(attrName in attrs)) {
|
394
394
|
if (attrName === ATTR_XLINK_HREF) {
|
@@ -6,16 +6,16 @@ var inherit = require("raptor-util/inherit");
|
|
6
6
|
var createFragmentNode = require("./morphdom/fragment").ao_;
|
7
7
|
|
8
8
|
function VFragment(key, ownerComponent, preserve) {
|
9
|
-
this.
|
10
|
-
this.
|
9
|
+
this.bA_(null /* childCount */, ownerComponent);
|
10
|
+
this.bB_ = key;
|
11
11
|
this.n_ = preserve;
|
12
12
|
}
|
13
13
|
|
14
14
|
VFragment.prototype = {
|
15
|
-
|
16
|
-
|
15
|
+
bC_: 12,
|
16
|
+
bz_: function () {
|
17
17
|
var fragment = createFragmentNode();
|
18
|
-
keysByDOMNode.set(fragment, this.
|
18
|
+
keysByDOMNode.set(fragment, this.bB_);
|
19
19
|
vElementByDOMNode.set(fragment, this);
|
20
20
|
return fragment;
|
21
21
|
} };
|