efront 4.4.9 → 4.4.11
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/coms/compile/Html.js +10 -3
- package/package.json +1 -1
- package/public/efront.js +71 -71
package/coms/compile/Html.js
CHANGED
|
@@ -17,6 +17,8 @@ const {
|
|
|
17
17
|
/*1024 */PROPERTY,
|
|
18
18
|
/*2048 */ELEMENT,
|
|
19
19
|
createScoped,
|
|
20
|
+
createString,
|
|
21
|
+
relink,
|
|
20
22
|
} = require("./common");
|
|
21
23
|
var ignore = { test() { return false } };
|
|
22
24
|
var property = new Program;
|
|
@@ -123,7 +125,7 @@ Html.prototype.createScoped = function (code) {
|
|
|
123
125
|
var nn = c.next.next;
|
|
124
126
|
if (!nn || nn.length > 0) return;
|
|
125
127
|
if (nn.type === EXPRESS || nn.type === QUOTED) {
|
|
126
|
-
vars[strings.decode(nn
|
|
128
|
+
vars[strings.decode(createString([nn]))] = true;
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
131
|
}
|
|
@@ -184,17 +186,22 @@ Html.prototype.createScoped = function (code) {
|
|
|
184
186
|
var root = rootNodes[0];
|
|
185
187
|
scoped.tagName = root.tagName;
|
|
186
188
|
var attrs = rootNodes[0].attributes;
|
|
189
|
+
var attributes = [];
|
|
190
|
+
if (attrs) relink(attrs);
|
|
187
191
|
if (attrs) for (var a of attrs) {
|
|
188
192
|
if (a.type === PROPERTY) {
|
|
189
|
-
|
|
193
|
+
var at = { name: a.text };
|
|
194
|
+
attributes.push(at);
|
|
190
195
|
var n = a.next;
|
|
191
196
|
if (!n) continue;
|
|
192
197
|
if (n.type !== STAMP || n.text !== '=') continue;
|
|
193
198
|
var nn = n.next;
|
|
199
|
+
if (nn.type === PROPERTY) continue;
|
|
194
200
|
if (!nn) continue;
|
|
195
|
-
|
|
201
|
+
at.value = this.createString([nn]);
|
|
196
202
|
}
|
|
197
203
|
}
|
|
204
|
+
scoped.attributes = attributes;
|
|
198
205
|
scoped.innerHTML = this.createString(rootNodes[0]);
|
|
199
206
|
}
|
|
200
207
|
else {
|