marko 5.31.7 → 5.31.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/runtime/components/update-manager.js +4 -17
- package/dist/runtime/createOut.js +1 -1
- package/dist/runtime/dom-insert.js +3 -3
- 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/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/html/index.js +1 -1
- package/dist/runtime/renderable.js +3 -3
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +70 -70
- package/dist/runtime/vdom/VComponent.js +3 -3
- package/dist/runtime/vdom/VDocumentFragment.js +6 -6
- package/dist/runtime/vdom/VElement.js +38 -38
- package/dist/runtime/vdom/VFragment.js +5 -5
- package/dist/runtime/vdom/VNode.js +31 -31
- 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 +2 -2
- package/dist/runtime/vdom/index.js +1 -1
- 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 +33 -33
- 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/docs/concise.md +22 -0
- package/package.json +1 -1
- package/src/runtime/components/update-manager.js +4 -17
@@ -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.bQ_(null /* childCount */, ownerComponent);
|
6
|
+
this.bR_ = key;
|
7
7
|
this.r_ = component;
|
8
8
|
this.aa_ = preserve;
|
9
9
|
}
|
10
10
|
|
11
11
|
VComponent.prototype = {
|
12
|
-
|
12
|
+
bS_: 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.bT_ = null;
|
7
8
|
this.bU_ = null;
|
8
|
-
this.bV_ = null;
|
9
9
|
}
|
10
10
|
|
11
11
|
function VDocumentFragment(out) {
|
12
|
-
this.
|
12
|
+
this.bQ_(null /* childCount */);
|
13
13
|
this.q_ = out;
|
14
14
|
}
|
15
15
|
|
16
16
|
VDocumentFragment.prototype = {
|
17
|
-
|
17
|
+
bS_: 11,
|
18
18
|
|
19
|
-
|
19
|
+
bV_: true,
|
20
20
|
|
21
|
-
|
21
|
+
bJ_: function () {
|
22
22
|
return new VDocumentFragmentClone(this);
|
23
23
|
},
|
24
24
|
|
25
|
-
|
25
|
+
bP_: function (host) {
|
26
26
|
return (host.ownerDocument || host).createDocumentFragment();
|
27
27
|
}
|
28
28
|
};
|
@@ -74,17 +74,17 @@ function removeAttribute(el, namespaceURI, name) {
|
|
74
74
|
}
|
75
75
|
|
76
76
|
function VElementClone(other) {
|
77
|
-
this.
|
77
|
+
this.bW_ = other.bW_;
|
78
|
+
this.bT_ = null;
|
78
79
|
this.bU_ = null;
|
79
|
-
this.bV_ = null;
|
80
80
|
|
81
|
-
this.
|
82
|
-
this.
|
81
|
+
this.bR_ = other.bR_;
|
82
|
+
this.bX_ = other.bX_;
|
83
83
|
this._L_ = other._L_;
|
84
|
-
this.
|
84
|
+
this.bY_ = other.bY_;
|
85
85
|
this.t_ = other.t_;
|
86
|
+
this.bZ_ = other.bZ_;
|
86
87
|
this.c__ = other.c__;
|
87
|
-
this.ca_ = other.ca_;
|
88
88
|
}
|
89
89
|
|
90
90
|
function VElement(
|
@@ -96,7 +96,7 @@ childCount,
|
|
96
96
|
flags,
|
97
97
|
props)
|
98
98
|
{
|
99
|
-
this.
|
99
|
+
this.bQ_(childCount, ownerComponent);
|
100
100
|
|
101
101
|
var constId;
|
102
102
|
|
@@ -104,21 +104,21 @@ props)
|
|
104
104
|
constId = props.i;
|
105
105
|
}
|
106
106
|
|
107
|
-
this.
|
107
|
+
this.bR_ = key;
|
108
108
|
this.t_ = flags || 0;
|
109
|
-
this.
|
109
|
+
this.bX_ = attrs || EMPTY_OBJECT;
|
110
110
|
this._L_ = props || EMPTY_OBJECT;
|
111
|
-
this.
|
112
|
-
this.
|
113
|
-
this.
|
111
|
+
this.bY_ = tagName;
|
112
|
+
this.bZ_ = null;
|
113
|
+
this.c__ = constId;
|
114
114
|
this.aa_ = false;
|
115
115
|
this.a__ = false;
|
116
116
|
}
|
117
117
|
|
118
118
|
VElement.prototype = {
|
119
|
-
|
119
|
+
bS_: 1,
|
120
120
|
|
121
|
-
|
121
|
+
bJ_: function () {
|
122
122
|
return new VElementClone(this);
|
123
123
|
},
|
124
124
|
|
@@ -130,7 +130,7 @@ VElement.prototype = {
|
|
130
130
|
* @param {int|null} childCount The number of child nodes (or `null` if not known)
|
131
131
|
*/
|
132
132
|
e: function (tagName, attrs, key, ownerComponent, childCount, flags, props) {
|
133
|
-
var child = this.
|
133
|
+
var child = this.bI_(
|
134
134
|
new VElement(
|
135
135
|
tagName,
|
136
136
|
attrs,
|
@@ -143,7 +143,7 @@ VElement.prototype = {
|
|
143
143
|
);
|
144
144
|
|
145
145
|
if (childCount === 0) {
|
146
|
-
return this.
|
146
|
+
return this.ca_();
|
147
147
|
} else {
|
148
148
|
return child;
|
149
149
|
}
|
@@ -156,15 +156,15 @@ VElement.prototype = {
|
|
156
156
|
* @param {String} value The value for the new Comment node
|
157
157
|
*/
|
158
158
|
n: function (node, ownerComponent) {
|
159
|
-
node = node.
|
159
|
+
node = node.bJ_();
|
160
160
|
node._J_ = ownerComponent;
|
161
|
-
this.
|
162
|
-
return this.
|
161
|
+
this.bI_(node);
|
162
|
+
return this.ca_();
|
163
163
|
},
|
164
164
|
|
165
|
-
|
166
|
-
var tagName = this.
|
167
|
-
var attributes = this.
|
165
|
+
bP_: function (host, parentNamespaceURI) {
|
166
|
+
var tagName = this.bY_;
|
167
|
+
var attributes = this.bX_;
|
168
168
|
var namespaceURI = DEFAULT_NS[tagName] || parentNamespaceURI || NS_HTML;
|
169
169
|
|
170
170
|
var flags = this.t_;
|
@@ -206,11 +206,11 @@ VElement.prototype = {
|
|
206
206
|
return el;
|
207
207
|
},
|
208
208
|
|
209
|
-
|
209
|
+
cb_: function (name) {
|
210
210
|
// We don't care about the namespaces since the there
|
211
211
|
// is no chance that attributes with the same name will have
|
212
212
|
// different namespaces
|
213
|
-
var value = this.
|
213
|
+
var value = this.bX_[name];
|
214
214
|
return value != null && value !== false;
|
215
215
|
}
|
216
216
|
};
|
@@ -222,7 +222,7 @@ var proto = VElementClone.prototype = VElement.prototype;
|
|
222
222
|
["checked", "selected", "disabled"].forEach(function (name) {
|
223
223
|
defineProperty(proto, name, {
|
224
224
|
get: function () {
|
225
|
-
var value = this.
|
225
|
+
var value = this.bX_[name];
|
226
226
|
return value !== false && value != null;
|
227
227
|
}
|
228
228
|
});
|
@@ -230,20 +230,20 @@ var proto = VElementClone.prototype = VElement.prototype;
|
|
230
230
|
|
231
231
|
defineProperty(proto, "e_", {
|
232
232
|
get: function () {
|
233
|
-
var value = this.
|
233
|
+
var value = this.bZ_;
|
234
234
|
if (value == null) {
|
235
|
-
value = this.
|
235
|
+
value = this.bX_.value;
|
236
236
|
}
|
237
237
|
return value != null && value !== false ?
|
238
238
|
value + "" :
|
239
|
-
this.
|
240
|
-
this.
|
239
|
+
this.bX_.type === "checkbox" ||
|
240
|
+
this.bX_.type === "radio" ?
|
241
241
|
"on" :
|
242
242
|
"";
|
243
243
|
}
|
244
244
|
});
|
245
245
|
|
246
|
-
VElement.
|
246
|
+
VElement.cc_ = function (attrs) {
|
247
247
|
// By default this static method is a no-op, but if there are any
|
248
248
|
// compiled components that have "no-update" attributes then
|
249
249
|
// `preserve-attrs.js` will be imported and this method will be replaced
|
@@ -291,8 +291,8 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
|
|
291
291
|
props
|
292
292
|
);
|
293
293
|
|
294
|
-
if (vdomEl.
|
295
|
-
vdomEl.
|
294
|
+
if (vdomEl.bY_ === "textarea") {
|
295
|
+
vdomEl.bZ_ = node.value;
|
296
296
|
} else if (virtualizeChildNodes) {
|
297
297
|
virtualizeChildNodes(node, vdomEl, ownerComponent);
|
298
298
|
}
|
@@ -300,17 +300,17 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
|
|
300
300
|
return vdomEl;
|
301
301
|
}
|
302
302
|
|
303
|
-
VElement.
|
303
|
+
VElement.cd_ = virtualizeElement;
|
304
304
|
|
305
|
-
VElement.
|
306
|
-
var removePreservedAttributes = VElement.
|
305
|
+
VElement.ce_ = function (fromEl, vFromEl, toEl) {
|
306
|
+
var removePreservedAttributes = VElement.cc_;
|
307
307
|
|
308
308
|
var fromFlags = vFromEl.t_;
|
309
309
|
var toFlags = toEl.t_;
|
310
310
|
|
311
311
|
vElementByDOMNode.set(fromEl, toEl);
|
312
312
|
|
313
|
-
var attrs = toEl.
|
313
|
+
var attrs = toEl.bX_;
|
314
314
|
var props = toEl._L_;
|
315
315
|
|
316
316
|
if (toFlags & FLAG_CUSTOM_ELEMENT) {
|
@@ -327,7 +327,7 @@ VElement.cf_ = function (fromEl, vFromEl, toEl) {
|
|
327
327
|
// real VElement node will not have the expando property
|
328
328
|
// so we build the attribute map from the expando property
|
329
329
|
|
330
|
-
var oldAttrs = vFromEl.
|
330
|
+
var oldAttrs = vFromEl.bX_;
|
331
331
|
|
332
332
|
if (oldAttrs) {
|
333
333
|
if (oldAttrs === attrs) {
|
@@ -399,7 +399,7 @@ VElement.cf_ = function (fromEl, vFromEl, toEl) {
|
|
399
399
|
// was not a virtualized node (i.e., a node that was not rendered by a
|
400
400
|
// Marko template, but rather a node that was created from an HTML
|
401
401
|
// string or a real DOM node).
|
402
|
-
if (toEl.
|
402
|
+
if (toEl.bR_ === null || fromFlags & FLAG_SPREAD_ATTRS) {
|
403
403
|
for (attrName in oldAttrs) {
|
404
404
|
if (!(attrName in attrs)) {
|
405
405
|
if (attrName === ATTR_XLINK_HREF) {
|
@@ -6,16 +6,16 @@ var inherit = require("raptor-util/inherit");
|
|
6
6
|
var createFragmentNode = require("./morphdom/fragment")._h_;
|
7
7
|
|
8
8
|
function VFragment(key, ownerComponent, preserve) {
|
9
|
-
this.
|
10
|
-
this.
|
9
|
+
this.bQ_(null /* childCount */, ownerComponent);
|
10
|
+
this.bR_ = key;
|
11
11
|
this.aa_ = preserve;
|
12
12
|
}
|
13
13
|
|
14
14
|
VFragment.prototype = {
|
15
|
-
|
16
|
-
|
15
|
+
bS_: 12,
|
16
|
+
bP_: function () {
|
17
17
|
var fragment = createFragmentNode();
|
18
|
-
keysByDOMNode.set(fragment, this.
|
18
|
+
keysByDOMNode.set(fragment, this.bR_);
|
19
19
|
vElementByDOMNode.set(fragment, this);
|
20
20
|
return fragment;
|
21
21
|
}
|
@@ -2,81 +2,81 @@
|
|
2
2
|
function VNode() {}
|
3
3
|
|
4
4
|
VNode.prototype = {
|
5
|
-
|
6
|
-
this.
|
7
|
-
this.
|
8
|
-
this.
|
9
|
-
this.
|
5
|
+
bQ_: function (finalChildCount, ownerComponent) {
|
6
|
+
this.cf_ = finalChildCount;
|
7
|
+
this.cg_ = 0;
|
8
|
+
this.bW_ = null;
|
9
|
+
this.ch_ = null;
|
10
|
+
this.bT_ = null;
|
10
11
|
this.bU_ = null;
|
11
|
-
this.bV_ = null;
|
12
12
|
this._J_ = ownerComponent;
|
13
13
|
},
|
14
14
|
|
15
15
|
get ay_() {
|
16
|
-
var firstChild = this.
|
16
|
+
var firstChild = this.bW_;
|
17
17
|
|
18
|
-
if (firstChild && firstChild.
|
18
|
+
if (firstChild && firstChild.bV_) {
|
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.ci_;
|
25
25
|
}
|
26
26
|
|
27
27
|
return firstChild;
|
28
28
|
},
|
29
29
|
|
30
|
-
get
|
31
|
-
var nextSibling = this.
|
30
|
+
get ci_() {
|
31
|
+
var nextSibling = this.bU_;
|
32
32
|
|
33
33
|
if (nextSibling) {
|
34
|
-
if (nextSibling.
|
34
|
+
if (nextSibling.bV_) {
|
35
35
|
var firstChild = nextSibling.ay_;
|
36
|
-
return firstChild || nextSibling.
|
36
|
+
return firstChild || nextSibling.ci_;
|
37
37
|
}
|
38
38
|
} else {
|
39
|
-
var parentNode = this.
|
40
|
-
if (parentNode && parentNode.
|
41
|
-
return parentNode.
|
39
|
+
var parentNode = this.bT_;
|
40
|
+
if (parentNode && parentNode.bV_) {
|
41
|
+
return parentNode.ci_;
|
42
42
|
}
|
43
43
|
}
|
44
44
|
|
45
45
|
return nextSibling;
|
46
46
|
},
|
47
47
|
|
48
|
-
|
49
|
-
this.
|
48
|
+
bI_: function (child) {
|
49
|
+
this.cg_++;
|
50
50
|
|
51
|
-
if (this.
|
52
|
-
if (child.
|
53
|
-
var childValue = child.
|
54
|
-
this.
|
51
|
+
if (this.bY_ === "textarea") {
|
52
|
+
if (child.cj_) {
|
53
|
+
var childValue = child.ck_;
|
54
|
+
this.bZ_ = (this.bZ_ || "") + childValue;
|
55
55
|
} else if (child.aa_ || child.a__) {
|
56
|
-
this.
|
56
|
+
this.cl_ = true;
|
57
57
|
} else {
|
58
58
|
throw TypeError();
|
59
59
|
}
|
60
60
|
} else {
|
61
|
-
var lastChild = this.
|
61
|
+
var lastChild = this.ch_;
|
62
62
|
|
63
|
-
child.
|
63
|
+
child.bT_ = this;
|
64
64
|
|
65
65
|
if (lastChild) {
|
66
|
-
lastChild.
|
66
|
+
lastChild.bU_ = child;
|
67
67
|
} else {
|
68
|
-
this.
|
68
|
+
this.bW_ = child;
|
69
69
|
}
|
70
70
|
|
71
|
-
this.
|
71
|
+
this.ch_ = child;
|
72
72
|
}
|
73
73
|
|
74
74
|
return child;
|
75
75
|
},
|
76
76
|
|
77
|
-
|
78
|
-
if (this.
|
79
|
-
return this.
|
77
|
+
ca_: function finishChild() {
|
78
|
+
if (this.cg_ === this.cf_ && this.bT_) {
|
79
|
+
return this.bT_.ca_();
|
80
80
|
} else {
|
81
81
|
return this;
|
82
82
|
}
|
@@ -2,21 +2,21 @@
|
|
2
2
|
var inherit = require("raptor-util/inherit");
|
3
3
|
|
4
4
|
function VText(value, ownerComponent) {
|
5
|
-
this.
|
6
|
-
this.
|
5
|
+
this.bQ_(-1 /* no children */, ownerComponent);
|
6
|
+
this.ck_ = value;
|
7
7
|
}
|
8
8
|
|
9
9
|
VText.prototype = {
|
10
|
-
|
10
|
+
cj_: true,
|
11
11
|
|
12
|
-
|
12
|
+
bS_: 3,
|
13
13
|
|
14
|
-
|
15
|
-
return (host.ownerDocument || host).createTextNode(this.
|
14
|
+
bP_: function (host) {
|
15
|
+
return (host.ownerDocument || host).createTextNode(this.ck_);
|
16
16
|
},
|
17
17
|
|
18
|
-
|
19
|
-
return new VText(this.
|
18
|
+
bJ_: function () {
|
19
|
+
return new VText(this.ck_);
|
20
20
|
}
|
21
21
|
};
|
22
22
|
|
@@ -44,7 +44,7 @@ runtime.t = function (typeName) {
|
|
44
44
|
instance.P_(input, out);
|
45
45
|
};
|
46
46
|
|
47
|
-
instance.
|
47
|
+
instance.cm_ = true;
|
48
48
|
instance.am_();
|
49
49
|
instance._t_ = false;
|
50
50
|
|
@@ -78,7 +78,7 @@ registry._C_ = function (typeName, id) {
|
|
78
78
|
if (instances) {
|
79
79
|
instances.add(instance);
|
80
80
|
instance.once("destroy", function () {
|
81
|
-
if (!instance.
|
81
|
+
if (!instance.cm_) {
|
82
82
|
instances.delete(instance);
|
83
83
|
}
|
84
84
|
});
|
@@ -1,5 +1,5 @@
|
|
1
1
|
"use strict";var helpers = require("./helpers");
|
2
|
-
var insertBefore = helpers.
|
2
|
+
var insertBefore = helpers.bc_;
|
3
3
|
|
4
4
|
var fragmentPrototype = {
|
5
5
|
nodeType: 12,
|
@@ -80,8 +80,8 @@ function createFragmentNode(startNode, nextNode, parentNode) {
|
|
80
80
|
|
81
81
|
function beginFragmentNode(startNode, parentNode) {
|
82
82
|
var fragment = createFragmentNode(startNode, null, parentNode);
|
83
|
-
fragment.
|
84
|
-
fragment.
|
83
|
+
fragment.cn_ = function (nextNode) {
|
84
|
+
fragment.cn_ = null;
|
85
85
|
insertBefore(
|
86
86
|
fragment.endNode,
|
87
87
|
nextNode,
|
@@ -92,4 +92,4 @@ function beginFragmentNode(startNode, parentNode) {
|
|
92
92
|
}
|
93
93
|
|
94
94
|
exports._h_ = createFragmentNode;
|
95
|
-
exports.
|
95
|
+
exports.co_ = beginFragmentNode;
|
@@ -35,8 +35,8 @@ function removeChild(node) {
|
|
35
35
|
node.parentNode.removeChild(node);
|
36
36
|
}
|
37
37
|
|
38
|
-
exports.
|
39
|
-
exports.
|
40
|
-
exports.
|
38
|
+
exports.bc_ = insertBefore;
|
39
|
+
exports.bd_ = insertAfter;
|
40
|
+
exports.ci_ = nextSibling;
|
41
41
|
exports.ay_ = firstChild;
|
42
|
-
exports.
|
42
|
+
exports.be_ = removeChild;
|
@@ -7,9 +7,9 @@ var destroyNodeRecursive = componentsUtil._O_;
|
|
7
7
|
var addComponentRootToKeyedElements =
|
8
8
|
componentsUtil._j_;
|
9
9
|
var normalizeComponentKey = componentsUtil._R_;
|
10
|
-
var VElement = require("../vdom").
|
11
|
-
var virtualizeElement = VElement.
|
12
|
-
var morphAttrs = VElement.
|
10
|
+
var VElement = require("../vdom").br_;
|
11
|
+
var virtualizeElement = VElement.cd_;
|
12
|
+
var morphAttrs = VElement.ce_;
|
13
13
|
var eventDelegation = require("../../components/event-delegation");
|
14
14
|
var fragment = require("./fragment");
|
15
15
|
var helpers = require("./helpers");
|
@@ -19,13 +19,13 @@ var componentByDOMNode = domData._l_;
|
|
19
19
|
var vElementByDOMNode = domData._H_;
|
20
20
|
var detachedByDOMNode = domData.aT_;
|
21
21
|
|
22
|
-
var insertBefore = helpers.
|
23
|
-
var insertAfter = helpers.
|
24
|
-
var nextSibling = helpers.
|
22
|
+
var insertBefore = helpers.bc_;
|
23
|
+
var insertAfter = helpers.bd_;
|
24
|
+
var nextSibling = helpers.ci_;
|
25
25
|
var firstChild = helpers.ay_;
|
26
|
-
var removeChild = helpers.
|
26
|
+
var removeChild = helpers.be_;
|
27
27
|
var createFragmentNode = fragment._h_;
|
28
|
-
var beginFragmentNode = fragment.
|
28
|
+
var beginFragmentNode = fragment.co_;
|
29
29
|
|
30
30
|
var ELEMENT_NODE = 1;
|
31
31
|
var TEXT_NODE = 3;
|
@@ -43,7 +43,7 @@ function isAutoKey(key) {
|
|
43
43
|
}
|
44
44
|
|
45
45
|
function compareNodeNames(fromEl, toEl) {
|
46
|
-
return fromEl.
|
46
|
+
return fromEl.bY_ === toEl.bY_;
|
47
47
|
}
|
48
48
|
|
49
49
|
function caseInsensitiveCompare(a, b) {
|
@@ -74,12 +74,12 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
74
74
|
ownerComponent,
|
75
75
|
parentComponent)
|
76
76
|
{
|
77
|
-
var realNode = vNode.
|
77
|
+
var realNode = vNode.bP_(host, parentEl.namespaceURI);
|
78
78
|
insertBefore(realNode, referenceEl, parentEl);
|
79
79
|
|
80
80
|
if (
|
81
|
-
vNode.
|
82
|
-
vNode.
|
81
|
+
vNode.bS_ === ELEMENT_NODE ||
|
82
|
+
vNode.bS_ === FRAGMENT_NODE)
|
83
83
|
{
|
84
84
|
if (key) {
|
85
85
|
keysByDOMNode.set(realNode, key);
|
@@ -88,7 +88,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
88
88
|
realNode;
|
89
89
|
}
|
90
90
|
|
91
|
-
if (vNode.
|
91
|
+
if (vNode.bY_ !== "textarea") {
|
92
92
|
morphChildren(realNode, vNode, parentComponent);
|
93
93
|
}
|
94
94
|
|
@@ -162,9 +162,9 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
162
162
|
var fromComponent;
|
163
163
|
|
164
164
|
outer: while (curToNodeChild) {
|
165
|
-
toNextSibling = curToNodeChild.
|
166
|
-
curToNodeType = curToNodeChild.
|
167
|
-
curToNodeKey = curToNodeChild.
|
165
|
+
toNextSibling = curToNodeChild.ci_;
|
166
|
+
curToNodeType = curToNodeChild.bS_;
|
167
|
+
curToNodeKey = curToNodeChild.bR_;
|
168
168
|
|
169
169
|
// Skip <!doctype>
|
170
170
|
if (curFromNodeChild && curFromNodeChild.nodeType === DOCTYPE_NODE) {
|
@@ -315,11 +315,11 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
315
315
|
curToNodeChild.aa_ ||
|
316
316
|
caseInsensitiveCompare(
|
317
317
|
curFromNodeChild.nodeName,
|
318
|
-
curToNodeChild.
|
318
|
+
curToNodeChild.bY_ || ""
|
319
319
|
)))
|
320
320
|
{
|
321
321
|
curVFromNodeChild = virtualizeElement(curFromNodeChild);
|
322
|
-
curVFromNodeChild.
|
322
|
+
curVFromNodeChild.bY_ = curToNodeChild.bY_;
|
323
323
|
keysByDOMNode.set(curFromNodeChild, curToNodeKey);
|
324
324
|
referenceComponent.J_[curToNodeKey] =
|
325
325
|
curFromNodeChild;
|
@@ -339,7 +339,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
339
339
|
curFromNodeChild = fromNextSibling;
|
340
340
|
continue;
|
341
341
|
} else if (
|
342
|
-
curToNodeChild.
|
342
|
+
curToNodeChild.bS_ === FRAGMENT_NODE &&
|
343
343
|
curFromNodeChild.nodeType === COMMENT_NODE)
|
344
344
|
{
|
345
345
|
var content = curFromNodeChild.nodeValue;
|
@@ -419,7 +419,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
419
419
|
|
420
420
|
if (
|
421
421
|
toNextSibling &&
|
422
|
-
toNextSibling.
|
422
|
+
toNextSibling.bR_ === curFromNodeKey)
|
423
423
|
{
|
424
424
|
// Single element swap
|
425
425
|
|
@@ -524,18 +524,18 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
524
524
|
|
525
525
|
if (
|
526
526
|
caseInsensitiveCompare(
|
527
|
-
curVFromNodeChild.
|
528
|
-
curToNodeChild.
|
527
|
+
curVFromNodeChild.bY_,
|
528
|
+
curToNodeChild.bY_
|
529
529
|
))
|
530
530
|
{
|
531
|
-
curVFromNodeChild.
|
531
|
+
curVFromNodeChild.bY_ = curToNodeChild.bY_;
|
532
532
|
}
|
533
533
|
} else {
|
534
534
|
// Skip over nodes that don't look like ours...
|
535
535
|
curFromNodeChild = fromNextSibling;
|
536
536
|
continue;
|
537
537
|
}
|
538
|
-
} else if (curFromNodeKey = curVFromNodeChild.
|
538
|
+
} else if (curFromNodeKey = curVFromNodeChild.bR_) {
|
539
539
|
// We have a keyed element here but our target VDOM node
|
540
540
|
// is not keyed so this not doesn't belong
|
541
541
|
isCompatible = false;
|
@@ -569,14 +569,14 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
569
569
|
isHydrate === true &&
|
570
570
|
toNextSibling &&
|
571
571
|
curFromNodeType === TEXT_NODE &&
|
572
|
-
toNextSibling.
|
572
|
+
toNextSibling.bS_ === TEXT_NODE)
|
573
573
|
{
|
574
574
|
fromNextSibling = curFromNodeChild.splitText(
|
575
|
-
curToNodeChild.
|
575
|
+
curToNodeChild.ck_.length
|
576
576
|
);
|
577
577
|
}
|
578
|
-
if (curFromNodeChild.nodeValue !== curToNodeChild.
|
579
|
-
curFromNodeChild.nodeValue = curToNodeChild.
|
578
|
+
if (curFromNodeChild.nodeValue !== curToNodeChild.ck_) {
|
579
|
+
curFromNodeChild.nodeValue = curToNodeChild.ck_;
|
580
580
|
}
|
581
581
|
}
|
582
582
|
}
|
@@ -610,10 +610,10 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
610
610
|
}
|
611
611
|
|
612
612
|
// We have processed all of the "to nodes".
|
613
|
-
if (fromNode.
|
613
|
+
if (fromNode.cn_) {
|
614
614
|
// If we are in an unfinished fragment, we have reached the end of the nodes
|
615
615
|
// we were matching up and need to end the fragment
|
616
|
-
fromNode.
|
616
|
+
fromNode.cn_(curFromNodeChild);
|
617
617
|
} else {
|
618
618
|
// If curFromNodeChild is non-null then we still have some from nodes
|
619
619
|
// left over that need to be removed
|
@@ -653,10 +653,10 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
653
653
|
}
|
654
654
|
|
655
655
|
function morphEl(fromEl, vFromEl, toEl, parentComponent) {
|
656
|
-
var nodeName = toEl.
|
656
|
+
var nodeName = toEl.bY_;
|
657
657
|
|
658
|
-
var constId = toEl.
|
659
|
-
if (constId !== undefined && vFromEl.
|
658
|
+
var constId = toEl.c__;
|
659
|
+
if (constId !== undefined && vFromEl.c__ === constId) {
|
660
660
|
return;
|
661
661
|
}
|
662
662
|
|