mol_dump_lib 0.0.4 → 0.0.5
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 +1 -0
- package/node.deps.json +1 -1
- package/node.js +11 -7
- package/node.js.map +1 -1
- package/node.mjs +11 -7
- package/node.test.js +11 -7
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +1 -0
- package/web.deps.json +1 -1
- package/web.js +11 -7
- package/web.js.map +1 -1
- package/web.mjs +11 -7
package/node.mjs
CHANGED
|
@@ -2339,6 +2339,15 @@ var $;
|
|
|
2339
2339
|
let all = [];
|
|
2340
2340
|
let el = null;
|
|
2341
2341
|
let timer = null;
|
|
2342
|
+
function $mol_style_attach_force() {
|
|
2343
|
+
if (all.length) {
|
|
2344
|
+
el.innerHTML += '\n' + all.join('\n\n');
|
|
2345
|
+
all = [];
|
|
2346
|
+
}
|
|
2347
|
+
timer = null;
|
|
2348
|
+
return el;
|
|
2349
|
+
}
|
|
2350
|
+
$.$mol_style_attach_force = $mol_style_attach_force;
|
|
2342
2351
|
function $mol_style_attach(id, text) {
|
|
2343
2352
|
all.push(`/* ${id} */\n\n${text}`);
|
|
2344
2353
|
if (timer)
|
|
@@ -2349,12 +2358,7 @@ var $;
|
|
|
2349
2358
|
el = doc.createElement('style');
|
|
2350
2359
|
el.id = `$mol_style_attach`;
|
|
2351
2360
|
doc.head.appendChild(el);
|
|
2352
|
-
timer = new $mol_after_tick(
|
|
2353
|
-
el.innerHTML = '\n' + all.join('\n\n');
|
|
2354
|
-
all = [];
|
|
2355
|
-
el = null;
|
|
2356
|
-
timer = null;
|
|
2357
|
-
});
|
|
2361
|
+
timer = new $mol_after_tick($mol_style_attach_force);
|
|
2358
2362
|
return el;
|
|
2359
2363
|
}
|
|
2360
2364
|
$.$mol_style_attach = $mol_style_attach;
|
|
@@ -3016,7 +3020,7 @@ var $;
|
|
|
3016
3020
|
this.attachShadow({ mode: 'open' });
|
|
3017
3021
|
const node = this.view.dom_node();
|
|
3018
3022
|
node.setAttribute('mol_view_root', '');
|
|
3019
|
-
this.shadowRoot.append(
|
|
3023
|
+
this.shadowRoot.append($mol_style_attach_force().cloneNode(true), node);
|
|
3020
3024
|
}
|
|
3021
3025
|
this.root = $mol_wire_auto();
|
|
3022
3026
|
try {
|
package/node.test.js
CHANGED
|
@@ -2331,6 +2331,15 @@ var $;
|
|
|
2331
2331
|
let all = [];
|
|
2332
2332
|
let el = null;
|
|
2333
2333
|
let timer = null;
|
|
2334
|
+
function $mol_style_attach_force() {
|
|
2335
|
+
if (all.length) {
|
|
2336
|
+
el.innerHTML += '\n' + all.join('\n\n');
|
|
2337
|
+
all = [];
|
|
2338
|
+
}
|
|
2339
|
+
timer = null;
|
|
2340
|
+
return el;
|
|
2341
|
+
}
|
|
2342
|
+
$.$mol_style_attach_force = $mol_style_attach_force;
|
|
2334
2343
|
function $mol_style_attach(id, text) {
|
|
2335
2344
|
all.push(`/* ${id} */\n\n${text}`);
|
|
2336
2345
|
if (timer)
|
|
@@ -2341,12 +2350,7 @@ var $;
|
|
|
2341
2350
|
el = doc.createElement('style');
|
|
2342
2351
|
el.id = `$mol_style_attach`;
|
|
2343
2352
|
doc.head.appendChild(el);
|
|
2344
|
-
timer = new $mol_after_tick(
|
|
2345
|
-
el.innerHTML = '\n' + all.join('\n\n');
|
|
2346
|
-
all = [];
|
|
2347
|
-
el = null;
|
|
2348
|
-
timer = null;
|
|
2349
|
-
});
|
|
2353
|
+
timer = new $mol_after_tick($mol_style_attach_force);
|
|
2350
2354
|
return el;
|
|
2351
2355
|
}
|
|
2352
2356
|
$.$mol_style_attach = $mol_style_attach;
|
|
@@ -3008,7 +3012,7 @@ var $;
|
|
|
3008
3012
|
this.attachShadow({ mode: 'open' });
|
|
3009
3013
|
const node = this.view.dom_node();
|
|
3010
3014
|
node.setAttribute('mol_view_root', '');
|
|
3011
|
-
this.shadowRoot.append(
|
|
3015
|
+
this.shadowRoot.append($mol_style_attach_force().cloneNode(true), node);
|
|
3012
3016
|
}
|
|
3013
3017
|
this.root = $mol_wire_auto();
|
|
3014
3018
|
try {
|