mol_jsx_lib 0.0.1098 → 0.0.1099
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/node.d.ts +5 -4
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +2 -1
- package/node.js.map +1 -1
- package/node.mjs +2 -1
- package/node.test.js +26 -12
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +5 -4
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js +2 -1
- package/web.js.map +1 -1
- package/web.mjs +2 -1
- package/web.test.js +24 -11
- package/web.test.js.map +1 -1
package/web.mjs
CHANGED
package/web.test.js
CHANGED
|
@@ -230,6 +230,17 @@ var $;
|
|
|
230
230
|
});
|
|
231
231
|
})($ || ($ = {}));
|
|
232
232
|
|
|
233
|
+
;
|
|
234
|
+
"use strict";
|
|
235
|
+
var $;
|
|
236
|
+
(function ($) {
|
|
237
|
+
function $mol_dom_serialize(node) {
|
|
238
|
+
const serializer = new $mol_dom_context.XMLSerializer;
|
|
239
|
+
return serializer.serializeToString(node);
|
|
240
|
+
}
|
|
241
|
+
$.$mol_dom_serialize = $mol_dom_serialize;
|
|
242
|
+
})($ || ($ = {}));
|
|
243
|
+
|
|
233
244
|
;
|
|
234
245
|
"use strict";
|
|
235
246
|
var $;
|
|
@@ -266,6 +277,19 @@ var $;
|
|
|
266
277
|
"!");
|
|
267
278
|
$mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
|
|
268
279
|
},
|
|
280
|
+
'Make fragment'() {
|
|
281
|
+
const dom = $mol_jsx($mol_jsx_frag, null,
|
|
282
|
+
$mol_jsx("br", null),
|
|
283
|
+
$mol_jsx("hr", null));
|
|
284
|
+
$mol_assert_equal($mol_dom_serialize(dom), '<br xmlns="http://www.w3.org/1999/xhtml" /><hr xmlns="http://www.w3.org/1999/xhtml" />');
|
|
285
|
+
},
|
|
286
|
+
'Spread fragment'() {
|
|
287
|
+
const dom = $mol_jsx("div", null,
|
|
288
|
+
$mol_jsx($mol_jsx_frag, null,
|
|
289
|
+
$mol_jsx("br", null),
|
|
290
|
+
$mol_jsx("hr", null)));
|
|
291
|
+
$mol_assert_equal(dom.outerHTML, '<div><br><hr></div>');
|
|
292
|
+
},
|
|
269
293
|
'Function as component'() {
|
|
270
294
|
const Button = (props, target) => {
|
|
271
295
|
return $mol_jsx("button", { title: props.hint }, target());
|
|
@@ -1993,17 +2017,6 @@ var $;
|
|
|
1993
2017
|
});
|
|
1994
2018
|
})($ || ($ = {}));
|
|
1995
2019
|
|
|
1996
|
-
;
|
|
1997
|
-
"use strict";
|
|
1998
|
-
var $;
|
|
1999
|
-
(function ($) {
|
|
2000
|
-
function $mol_dom_serialize(node) {
|
|
2001
|
-
const serializer = new $mol_dom_context.XMLSerializer;
|
|
2002
|
-
return serializer.serializeToString(node);
|
|
2003
|
-
}
|
|
2004
|
-
$.$mol_dom_serialize = $mol_dom_serialize;
|
|
2005
|
-
})($ || ($ = {}));
|
|
2006
|
-
|
|
2007
2020
|
;
|
|
2008
2021
|
"use strict";
|
|
2009
2022
|
var $;
|