marko 5.39.37 → 5.39.39
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/helpers/dynamic-tag.js +7 -1
- package/dist/runtime/html/AsyncStream.js +34 -41
- package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
- package/dist/runtime/html/helpers/attr.js +2 -2
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +64 -64
- package/dist/runtime/vdom/VComment.js +6 -6
- package/dist/runtime/vdom/VComponent.js +3 -3
- package/dist/runtime/vdom/VDocumentFragment.js +5 -5
- package/dist/runtime/vdom/VElement.js +29 -29
- package/dist/runtime/vdom/VFragment.js +4 -4
- package/dist/runtime/vdom/VNode.js +29 -29
- package/dist/runtime/vdom/VText.js +7 -7
- 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 +33 -33
- package/dist/runtime/vdom/vdom.js +15 -15
- package/dist/translator/index.js +0 -3
- package/dist/translator/util/add-dependencies.js +0 -1
- package/dist/translator/util/get-component-files.js +1 -1
- package/package.json +4 -4
- package/src/runtime/helpers/dynamic-tag.js +7 -1
- package/src/runtime/html/AsyncStream.js +34 -41
- package/src/translator/index.js +0 -3
- package/src/translator/util/add-dependencies.js +0 -1
- package/dist/runtime/events.js +0 -2
- package/dist/runtime/helpers/assign.js +0 -21
- package/dist/runtime/helpers/merge.js +0 -13
- package/dist/runtime/html/helpers/props-script.js +0 -30
- package/src/runtime/events.js +0 -2
- package/src/runtime/helpers/assign.js +0 -21
- package/src/runtime/helpers/merge.js +0 -13
- package/src/runtime/html/helpers/props-script.js +0 -30
|
@@ -83,6 +83,7 @@ customEvents)
|
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
|
|
86
|
+
var classRenderer = renderer;
|
|
86
87
|
if (dynamicTag.bq_) {
|
|
87
88
|
renderer = dynamicTag.bq_(
|
|
88
89
|
renderer,
|
|
@@ -94,7 +95,12 @@ customEvents)
|
|
|
94
95
|
|
|
95
96
|
if (renderer) {
|
|
96
97
|
out.c(componentDef, key, customEvents);
|
|
97
|
-
renderer(
|
|
98
|
+
renderer(
|
|
99
|
+
renderer === classRenderer ?
|
|
100
|
+
attrs :
|
|
101
|
+
addTagsEvents(attrs, componentDef, customEvents),
|
|
102
|
+
out
|
|
103
|
+
);
|
|
98
104
|
out.ac_ = null;
|
|
99
105
|
} else {
|
|
100
106
|
var isFn = typeof render === "function";
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
var EventEmitter = require("events-light");
|
|
3
3
|
var selfClosingTags = require("self-closing-tags");
|
|
4
4
|
var RenderResult = require("../RenderResult");
|
|
5
|
-
var parseHTML = require("../vdom/parse-html");
|
|
6
5
|
var BufferedWriter = require("./BufferedWriter");
|
|
7
6
|
var attrsHelper = require("./helpers/attrs");
|
|
8
7
|
var markoAttr = require("./helpers/data-marko");
|
|
@@ -96,8 +95,6 @@ function AsyncStream(global, writer, parentOut) {
|
|
|
96
95
|
this.name = undefined;
|
|
97
96
|
this._timeoutId = undefined;
|
|
98
97
|
|
|
99
|
-
this._node = undefined;
|
|
100
|
-
|
|
101
98
|
this._elStack = undefined; // Array
|
|
102
99
|
|
|
103
100
|
this.b_ = null; // ComponentsContext
|
|
@@ -125,7 +122,6 @@ AsyncStream.enableAsyncStackTrace = function () {
|
|
|
125
122
|
|
|
126
123
|
var proto = AsyncStream.prototype = {
|
|
127
124
|
constructor: AsyncStream,
|
|
128
|
-
C_: typeof document === "object" && document,
|
|
129
125
|
bx_: true,
|
|
130
126
|
|
|
131
127
|
[Symbol.asyncIterator]() {
|
|
@@ -136,6 +132,7 @@ var proto = AsyncStream.prototype = {
|
|
|
136
132
|
const originalWriter = this._state.writer;
|
|
137
133
|
let buffer = "";
|
|
138
134
|
let iteratorNextFn;
|
|
135
|
+
let iteratorReturnFn = defaultIteratorReturn;
|
|
139
136
|
|
|
140
137
|
if (!originalWriter.stream) {
|
|
141
138
|
// Writing has finished completely so we can use a simple iterator
|
|
@@ -151,7 +148,7 @@ var proto = AsyncStream.prototype = {
|
|
|
151
148
|
let pending;
|
|
152
149
|
const stream = {
|
|
153
150
|
write(data) {
|
|
154
|
-
buffer += data;
|
|
151
|
+
if (!done) buffer += data;
|
|
155
152
|
},
|
|
156
153
|
end() {
|
|
157
154
|
done = true;
|
|
@@ -220,6 +217,20 @@ var proto = AsyncStream.prototype = {
|
|
|
220
217
|
|
|
221
218
|
return pending.promise;
|
|
222
219
|
};
|
|
220
|
+
|
|
221
|
+
// The last consumer to leave is still waiting on `pending`, which only a
|
|
222
|
+
// later write would settle; end the iteration instead of hanging on it.
|
|
223
|
+
iteratorReturnFn = (value) => {
|
|
224
|
+
done = true;
|
|
225
|
+
buffer = "";
|
|
226
|
+
|
|
227
|
+
if (pending) {
|
|
228
|
+
pending.resolve({ value: undefined, done: true });
|
|
229
|
+
pending = undefined;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return defaultIteratorReturn(value);
|
|
233
|
+
};
|
|
223
234
|
}
|
|
224
235
|
|
|
225
236
|
return this.by_ = {
|
|
@@ -234,15 +245,23 @@ var proto = AsyncStream.prototype = {
|
|
|
234
245
|
|
|
235
246
|
toReadable() {
|
|
236
247
|
let cancelled = false;
|
|
248
|
+
this.bz_ = (this.bz_ || 0) + 1;
|
|
237
249
|
return new ReadableStream({
|
|
238
250
|
start: async (ctrl) => {
|
|
239
251
|
const encoder = new TextEncoder();
|
|
252
|
+
const iterator = this[Symbol.asyncIterator]();
|
|
240
253
|
try {
|
|
241
|
-
for
|
|
254
|
+
for (;;) {
|
|
255
|
+
// Read by hand: `for await` would close the shared iterator on the
|
|
256
|
+
// way out, ending the consumers still reading it.
|
|
257
|
+
const result = await iterator.next();
|
|
242
258
|
if (cancelled) {
|
|
243
259
|
return;
|
|
244
260
|
}
|
|
245
|
-
|
|
261
|
+
if (result.done) {
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
ctrl.enqueue(encoder.encode(result.value));
|
|
246
265
|
}
|
|
247
266
|
ctrl.close();
|
|
248
267
|
} catch (err) {
|
|
@@ -251,8 +270,14 @@ var proto = AsyncStream.prototype = {
|
|
|
251
270
|
}
|
|
252
271
|
}
|
|
253
272
|
},
|
|
254
|
-
cancel() {
|
|
273
|
+
cancel: () => {
|
|
255
274
|
cancelled = true;
|
|
275
|
+
|
|
276
|
+
// Every consumer shares one iterator, so only the last one out may end
|
|
277
|
+
// it; the others are still reading.
|
|
278
|
+
if (! --this.bz_) {
|
|
279
|
+
this[Symbol.asyncIterator]().return();
|
|
280
|
+
}
|
|
256
281
|
}
|
|
257
282
|
});
|
|
258
283
|
},
|
|
@@ -750,38 +775,6 @@ var proto = AsyncStream.prototype = {
|
|
|
750
775
|
}
|
|
751
776
|
},
|
|
752
777
|
|
|
753
|
-
aj_: function (host) {
|
|
754
|
-
var node = this._node;
|
|
755
|
-
|
|
756
|
-
if (!node) {
|
|
757
|
-
var nextEl;
|
|
758
|
-
var fragment;
|
|
759
|
-
var html = this.ak_();
|
|
760
|
-
if (!host) host = this.C_;
|
|
761
|
-
var doc = host.ownerDocument || host;
|
|
762
|
-
|
|
763
|
-
if (html) {
|
|
764
|
-
node = parseHTML(html);
|
|
765
|
-
|
|
766
|
-
if (node && node.nextSibling) {
|
|
767
|
-
// If there are multiple nodes, turn it into a document fragment.
|
|
768
|
-
fragment = doc.createDocumentFragment();
|
|
769
|
-
|
|
770
|
-
do {
|
|
771
|
-
nextEl = node.nextSibling;
|
|
772
|
-
fragment.appendChild(node);
|
|
773
|
-
} while (node = nextEl);
|
|
774
|
-
|
|
775
|
-
node = fragment;
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
// if HTML is empty use empty document fragment (so that we're returning a valid DOM node)
|
|
780
|
-
this._node = node || doc.createDocumentFragment();
|
|
781
|
-
}
|
|
782
|
-
return node;
|
|
783
|
-
},
|
|
784
|
-
|
|
785
778
|
then: function (fn, fnErr) {
|
|
786
779
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
787
780
|
var out = this;
|
|
@@ -823,7 +816,7 @@ function getNonMarkoStack(error) {
|
|
|
823
816
|
join("\n");
|
|
824
817
|
}
|
|
825
818
|
|
|
826
|
-
function
|
|
819
|
+
function defaultIteratorReturn(value) {
|
|
827
820
|
return Promise.resolve({
|
|
828
821
|
value,
|
|
829
822
|
done: true
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var attrHelper = require("./attr");
|
|
3
|
-
var notEmptyAttr = attrHelper.
|
|
4
|
-
var isEmptyAttrValue = attrHelper.
|
|
3
|
+
var notEmptyAttr = attrHelper.bA_;
|
|
4
|
+
var isEmptyAttrValue = attrHelper.bB_;
|
|
5
5
|
var classHelper = require("./class-attr");
|
|
6
6
|
var styleHelper = require("./style-attr");
|
|
7
7
|
|
|
@@ -3,21 +3,21 @@ 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 VComment = vdom.
|
|
8
|
-
var VDocumentFragment = vdom.
|
|
9
|
-
var VText = vdom.
|
|
10
|
-
var VComponent = vdom.
|
|
11
|
-
var VFragment = vdom.
|
|
12
|
-
var virtualizeHTML = vdom.
|
|
6
|
+
var VElement = vdom.bC_;
|
|
7
|
+
var VComment = vdom.bD_;
|
|
8
|
+
var VDocumentFragment = vdom.bE_;
|
|
9
|
+
var VText = vdom.bF_;
|
|
10
|
+
var VComponent = vdom.bG_;
|
|
11
|
+
var VFragment = vdom.bH_;
|
|
12
|
+
var virtualizeHTML = vdom.bI_;
|
|
13
13
|
|
|
14
14
|
var EVENT_UPDATE = "update";
|
|
15
15
|
var EVENT_FINISH = "finish";
|
|
16
16
|
|
|
17
17
|
function State(tree) {
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
18
|
+
this.bJ_ = new EventEmitter();
|
|
19
|
+
this.bK_ = tree;
|
|
20
|
+
this.bL_ = false;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
function AsyncVDOMBuilder(globalData, parentNode, parentOut) {
|
|
@@ -33,18 +33,18 @@ function AsyncVDOMBuilder(globalData, parentNode, parentOut) {
|
|
|
33
33
|
state = new State(parentNode);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
36
|
+
this.bM_ = 1;
|
|
37
|
+
this.bN_ = 0;
|
|
38
|
+
this.bO_ = null;
|
|
39
|
+
this.bP_ = parentOut;
|
|
40
40
|
|
|
41
41
|
this.data = {};
|
|
42
42
|
this.A_ = state;
|
|
43
43
|
this.ae_ = parentNode;
|
|
44
44
|
this.global = globalData || {};
|
|
45
|
-
this.
|
|
46
|
-
this.
|
|
47
|
-
this.
|
|
45
|
+
this.bQ_ = [parentNode];
|
|
46
|
+
this.bR_ = false;
|
|
47
|
+
this.bS_ = undefined;
|
|
48
48
|
this.b_ = null;
|
|
49
49
|
|
|
50
50
|
this.ac_ = null;
|
|
@@ -58,18 +58,18 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
58
58
|
|
|
59
59
|
bc: function (component, key, ownerComponent) {
|
|
60
60
|
var vComponent = new VComponent(component, key, ownerComponent);
|
|
61
|
-
return this.
|
|
61
|
+
return this.bT_(vComponent, 0, true);
|
|
62
62
|
},
|
|
63
63
|
|
|
64
64
|
bg_: function (component, key, ownerComponent) {
|
|
65
65
|
var vComponent = new VComponent(component, key, ownerComponent, true);
|
|
66
|
-
this.
|
|
66
|
+
this.bT_(vComponent, 0);
|
|
67
67
|
},
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
this.ae_.
|
|
69
|
+
bT_: function (child, childCount, pushToStack) {
|
|
70
|
+
this.ae_.bU_(child);
|
|
71
71
|
if (pushToStack === true) {
|
|
72
|
-
this.
|
|
72
|
+
this.bQ_.push(child);
|
|
73
73
|
this.ae_ = child;
|
|
74
74
|
}
|
|
75
75
|
return childCount === 0 ? this : child;
|
|
@@ -85,7 +85,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
85
85
|
flags,
|
|
86
86
|
props
|
|
87
87
|
);
|
|
88
|
-
return this.
|
|
88
|
+
return this.bT_(element, childCount);
|
|
89
89
|
},
|
|
90
90
|
|
|
91
91
|
bp_: function (tagName, attrs, key, componentDef, props) {
|
|
@@ -103,7 +103,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
103
103
|
n: function (node, component) {
|
|
104
104
|
// NOTE: We do a shallow clone since we assume the node is being reused
|
|
105
105
|
// and a node can only have one parent node.
|
|
106
|
-
var clone = node.
|
|
106
|
+
var clone = node.bV_();
|
|
107
107
|
this.node(clone);
|
|
108
108
|
clone._P_ = component;
|
|
109
109
|
|
|
@@ -111,7 +111,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
111
111
|
},
|
|
112
112
|
|
|
113
113
|
node: function (node) {
|
|
114
|
-
this.ae_.
|
|
114
|
+
this.ae_.bU_(node);
|
|
115
115
|
return this;
|
|
116
116
|
},
|
|
117
117
|
|
|
@@ -130,7 +130,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
130
130
|
text = text.toString();
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
this.ae_.
|
|
133
|
+
this.ae_.bU_(new VText(text, ownerComponent));
|
|
134
134
|
return this;
|
|
135
135
|
},
|
|
136
136
|
|
|
@@ -165,7 +165,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
165
165
|
flags,
|
|
166
166
|
props
|
|
167
167
|
);
|
|
168
|
-
this.
|
|
168
|
+
this.bT_(element, childCount, true);
|
|
169
169
|
return this;
|
|
170
170
|
},
|
|
171
171
|
|
|
@@ -183,7 +183,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
183
183
|
|
|
184
184
|
bf: function (key, component, preserve) {
|
|
185
185
|
var fragment = new VFragment(key, component, preserve);
|
|
186
|
-
this.
|
|
186
|
+
this.bT_(fragment, null, true);
|
|
187
187
|
return this;
|
|
188
188
|
},
|
|
189
189
|
|
|
@@ -192,7 +192,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
192
192
|
},
|
|
193
193
|
|
|
194
194
|
endElement: function () {
|
|
195
|
-
var stack = this.
|
|
195
|
+
var stack = this.bQ_;
|
|
196
196
|
stack.pop();
|
|
197
197
|
this.ae_ = stack[stack.length - 1];
|
|
198
198
|
},
|
|
@@ -200,44 +200,44 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
200
200
|
end: function () {
|
|
201
201
|
this.ae_ = undefined;
|
|
202
202
|
|
|
203
|
-
var remaining = --this.
|
|
204
|
-
var parentOut = this.
|
|
203
|
+
var remaining = --this.bM_;
|
|
204
|
+
var parentOut = this.bP_;
|
|
205
205
|
|
|
206
206
|
if (remaining === 0) {
|
|
207
207
|
if (parentOut) {
|
|
208
|
-
parentOut.
|
|
208
|
+
parentOut.bW_();
|
|
209
209
|
} else {
|
|
210
|
-
this.
|
|
210
|
+
this.bX_();
|
|
211
211
|
}
|
|
212
|
-
} else if (remaining - this.
|
|
213
|
-
this.
|
|
212
|
+
} else if (remaining - this.bN_ === 0) {
|
|
213
|
+
this.bY_();
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
return this;
|
|
217
217
|
},
|
|
218
218
|
|
|
219
|
-
|
|
220
|
-
var remaining = --this.
|
|
219
|
+
bW_: function () {
|
|
220
|
+
var remaining = --this.bM_;
|
|
221
221
|
|
|
222
222
|
if (remaining === 0) {
|
|
223
|
-
var parentOut = this.
|
|
223
|
+
var parentOut = this.bP_;
|
|
224
224
|
if (parentOut) {
|
|
225
|
-
parentOut.
|
|
225
|
+
parentOut.bW_();
|
|
226
226
|
} else {
|
|
227
|
-
this.
|
|
227
|
+
this.bX_();
|
|
228
228
|
}
|
|
229
|
-
} else if (remaining - this.
|
|
230
|
-
this.
|
|
229
|
+
} else if (remaining - this.bN_ === 0) {
|
|
230
|
+
this.bY_();
|
|
231
231
|
}
|
|
232
232
|
},
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
bX_: function () {
|
|
235
235
|
var state = this.A_;
|
|
236
|
-
state.
|
|
237
|
-
state.
|
|
236
|
+
state.bL_ = true;
|
|
237
|
+
state.bJ_.emit(EVENT_FINISH, this.n_());
|
|
238
238
|
},
|
|
239
239
|
|
|
240
|
-
|
|
240
|
+
bY_: function () {
|
|
241
241
|
var lastArray = this._last;
|
|
242
242
|
|
|
243
243
|
var i = 0;
|
|
@@ -272,7 +272,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
272
272
|
},
|
|
273
273
|
|
|
274
274
|
beginAsync: function (options) {
|
|
275
|
-
if (this.
|
|
275
|
+
if (this.bR_) {
|
|
276
276
|
throw Error(
|
|
277
277
|
"Tried to render async while in sync mode. Note: Client side await is not currently supported in re-renders (Issue: #942)."
|
|
278
278
|
);
|
|
@@ -282,16 +282,16 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
282
282
|
|
|
283
283
|
if (options) {
|
|
284
284
|
if (options.last) {
|
|
285
|
-
this.
|
|
285
|
+
this.bN_++;
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
this.
|
|
289
|
+
this.bM_++;
|
|
290
290
|
|
|
291
|
-
var documentFragment = this.ae_.
|
|
291
|
+
var documentFragment = this.ae_.bZ_();
|
|
292
292
|
var asyncOut = new AsyncVDOMBuilder(this.global, documentFragment, this);
|
|
293
293
|
|
|
294
|
-
state.
|
|
294
|
+
state.bJ_.emit("beginAsync", {
|
|
295
295
|
out: asyncOut,
|
|
296
296
|
parentOut: this
|
|
297
297
|
});
|
|
@@ -304,7 +304,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
304
304
|
},
|
|
305
305
|
|
|
306
306
|
flush: function () {
|
|
307
|
-
var events = this.A_.
|
|
307
|
+
var events = this.A_.bJ_;
|
|
308
308
|
|
|
309
309
|
if (events.listenerCount(EVENT_UPDATE)) {
|
|
310
310
|
events.emit(EVENT_UPDATE, new RenderResult(this));
|
|
@@ -312,22 +312,22 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
312
312
|
},
|
|
313
313
|
|
|
314
314
|
ak_: function () {
|
|
315
|
-
return this.A_.
|
|
315
|
+
return this.A_.bK_;
|
|
316
316
|
},
|
|
317
317
|
|
|
318
318
|
n_: function () {
|
|
319
|
-
return this.
|
|
319
|
+
return this.c__ || (this.c__ = new RenderResult(this));
|
|
320
320
|
},
|
|
321
321
|
|
|
322
322
|
on: function (event, callback) {
|
|
323
323
|
var state = this.A_;
|
|
324
324
|
|
|
325
|
-
if (event === EVENT_FINISH && state.
|
|
325
|
+
if (event === EVENT_FINISH && state.bL_) {
|
|
326
326
|
callback(this.n_());
|
|
327
327
|
} else if (event === "last") {
|
|
328
328
|
this.onLast(callback);
|
|
329
329
|
} else {
|
|
330
|
-
state.
|
|
330
|
+
state.bJ_.on(event, callback);
|
|
331
331
|
}
|
|
332
332
|
|
|
333
333
|
return this;
|
|
@@ -336,19 +336,19 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
336
336
|
once: function (event, callback) {
|
|
337
337
|
var state = this.A_;
|
|
338
338
|
|
|
339
|
-
if (event === EVENT_FINISH && state.
|
|
339
|
+
if (event === EVENT_FINISH && state.bL_) {
|
|
340
340
|
callback(this.n_());
|
|
341
341
|
} else if (event === "last") {
|
|
342
342
|
this.onLast(callback);
|
|
343
343
|
} else {
|
|
344
|
-
state.
|
|
344
|
+
state.bJ_.once(event, callback);
|
|
345
345
|
}
|
|
346
346
|
|
|
347
347
|
return this;
|
|
348
348
|
},
|
|
349
349
|
|
|
350
350
|
emit: function (type, arg) {
|
|
351
|
-
var events = this.A_.
|
|
351
|
+
var events = this.A_.bJ_;
|
|
352
352
|
switch (arguments.length) {
|
|
353
353
|
case 1:
|
|
354
354
|
events.emit(type);
|
|
@@ -364,17 +364,17 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
364
364
|
},
|
|
365
365
|
|
|
366
366
|
removeListener: function () {
|
|
367
|
-
var events = this.A_.
|
|
367
|
+
var events = this.A_.bJ_;
|
|
368
368
|
events.removeListener.apply(events, arguments);
|
|
369
369
|
return this;
|
|
370
370
|
},
|
|
371
371
|
|
|
372
372
|
sync: function () {
|
|
373
|
-
this.
|
|
373
|
+
this.bR_ = true;
|
|
374
374
|
},
|
|
375
375
|
|
|
376
376
|
isSync: function () {
|
|
377
|
-
return this.
|
|
377
|
+
return this.bR_;
|
|
378
378
|
},
|
|
379
379
|
|
|
380
380
|
onLast: function (callback) {
|
|
@@ -390,12 +390,12 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
390
390
|
},
|
|
391
391
|
|
|
392
392
|
aj_: function (host) {
|
|
393
|
-
var node = this.
|
|
393
|
+
var node = this.bS_;
|
|
394
394
|
if (!node) {
|
|
395
395
|
var vdomTree = this.ak_();
|
|
396
396
|
|
|
397
397
|
if (!host) host = this.C_;
|
|
398
|
-
this.
|
|
398
|
+
this.bS_ = node = vdomTree.bu_(host, null);
|
|
399
399
|
morphdom(node, vdomTree, host, this.b_);
|
|
400
400
|
}
|
|
401
401
|
return node;
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
var inherit = require("raptor-util/inherit");
|
|
3
3
|
|
|
4
4
|
function VComment(value, ownerComponent) {
|
|
5
|
-
this.
|
|
6
|
-
this.
|
|
5
|
+
this.ca_(-1 /* no children */, ownerComponent);
|
|
6
|
+
this.cb_ = value;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
VComment.prototype = {
|
|
10
|
-
|
|
10
|
+
cc_: 8,
|
|
11
11
|
|
|
12
12
|
bu_: function (host) {
|
|
13
|
-
var nodeValue = this.
|
|
13
|
+
var nodeValue = this.cb_;
|
|
14
14
|
return (host.ownerDocument || host).createComment(nodeValue);
|
|
15
15
|
},
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
return new VComment(this.
|
|
17
|
+
bV_: function () {
|
|
18
|
+
return new VComment(this.cb_);
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -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.ca_(null /* childCount */, ownerComponent);
|
|
6
|
+
this.cd_ = key;
|
|
7
7
|
this.s_ = component;
|
|
8
8
|
this.ag_ = preserve;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
VComponent.prototype = {
|
|
12
|
-
|
|
12
|
+
cc_: 2
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
inherit(VComponent, VNode);
|
|
@@ -4,21 +4,21 @@ var VNode = require("./VNode");
|
|
|
4
4
|
|
|
5
5
|
function VDocumentFragmentClone(other) {
|
|
6
6
|
extend(this, other);
|
|
7
|
-
this.cd_ = null;
|
|
8
7
|
this.ce_ = null;
|
|
8
|
+
this.cf_ = null;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
function VDocumentFragment(out) {
|
|
12
|
-
this.
|
|
12
|
+
this.ca_(null /* childCount */);
|
|
13
13
|
this.r_ = out;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
VDocumentFragment.prototype = {
|
|
17
|
-
|
|
17
|
+
cc_: 11,
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
cg_: true,
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
bV_: function () {
|
|
22
22
|
return new VDocumentFragmentClone(this);
|
|
23
23
|
},
|
|
24
24
|
|