mol_wire_lib 1.0.1232 → 1.0.1234
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 -1
- 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 -0
- package/web.test.js.map +1 -1
package/web.mjs
CHANGED
package/web.test.js
CHANGED
|
@@ -178,6 +178,17 @@ var $;
|
|
|
178
178
|
;
|
|
179
179
|
"use strict";
|
|
180
180
|
|
|
181
|
+
;
|
|
182
|
+
"use strict";
|
|
183
|
+
var $;
|
|
184
|
+
(function ($) {
|
|
185
|
+
function $mol_dom_serialize(node) {
|
|
186
|
+
const serializer = new $mol_dom_context.XMLSerializer;
|
|
187
|
+
return serializer.serializeToString(node);
|
|
188
|
+
}
|
|
189
|
+
$.$mol_dom_serialize = $mol_dom_serialize;
|
|
190
|
+
})($ || ($ = {}));
|
|
191
|
+
|
|
181
192
|
;
|
|
182
193
|
"use strict";
|
|
183
194
|
var $;
|
|
@@ -335,6 +346,19 @@ var $;
|
|
|
335
346
|
"!");
|
|
336
347
|
$mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
|
|
337
348
|
},
|
|
349
|
+
'Make fragment'() {
|
|
350
|
+
const dom = $mol_jsx($mol_jsx_frag, null,
|
|
351
|
+
$mol_jsx("br", null),
|
|
352
|
+
$mol_jsx("hr", null));
|
|
353
|
+
$mol_assert_equal($mol_dom_serialize(dom), '<br xmlns="http://www.w3.org/1999/xhtml" /><hr xmlns="http://www.w3.org/1999/xhtml" />');
|
|
354
|
+
},
|
|
355
|
+
'Spread fragment'() {
|
|
356
|
+
const dom = $mol_jsx("div", null,
|
|
357
|
+
$mol_jsx($mol_jsx_frag, null,
|
|
358
|
+
$mol_jsx("br", null),
|
|
359
|
+
$mol_jsx("hr", null)));
|
|
360
|
+
$mol_assert_equal(dom.outerHTML, '<div><br><hr></div>');
|
|
361
|
+
},
|
|
338
362
|
'Function as component'() {
|
|
339
363
|
const Button = (props, target) => {
|
|
340
364
|
return $mol_jsx("button", { title: props.hint }, target());
|