frosty 0.0.42 → 0.0.44
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/dom.js +1 -1
- package/dist/dom.mjs +1 -1
- package/dist/internals/{common-1tFNfKXg.mjs → common-Cmc9qJmA.mjs} +9 -5
- package/dist/internals/{common-1tFNfKXg.mjs.map → common-Cmc9qJmA.mjs.map} +1 -1
- package/dist/internals/{common-Da9gnaMF.js → common-P5AZ4-Yt.js} +9 -5
- package/dist/internals/{common-Da9gnaMF.js.map → common-P5AZ4-Yt.js.map} +1 -1
- package/dist/server-dom.js +1 -1
- package/dist/server-dom.mjs +1 -1
- package/dist/web.d.ts +3 -1
- package/dist/web.js +46 -1
- package/dist/web.js.map +1 -1
- package/dist/web.mjs +47 -3
- package/dist/web.mjs.map +1 -1
- package/package.json +1 -1
package/dist/dom.js
CHANGED
package/dist/dom.mjs
CHANGED
|
@@ -3920,9 +3920,10 @@ class _DOMRenderer extends _Renderer {
|
|
|
3920
3920
|
/** @internal */
|
|
3921
3921
|
_afterUpdate() {
|
|
3922
3922
|
this._tracked_style.select(this._tracked_style_names);
|
|
3923
|
+
const head = this.document.head ?? this.document.createElementNS(HTML_NS, 'head');
|
|
3923
3924
|
if (this._tracked_style.isEmpty) {
|
|
3924
3925
|
if (this._server) {
|
|
3925
|
-
this.__replaceChildren(
|
|
3926
|
+
this.__replaceChildren(head, this._tracked_head_children);
|
|
3926
3927
|
}
|
|
3927
3928
|
}
|
|
3928
3929
|
else {
|
|
@@ -3930,12 +3931,15 @@ class _DOMRenderer extends _Renderer {
|
|
|
3930
3931
|
styleElem.setAttribute('data-frosty-style', '');
|
|
3931
3932
|
styleElem.textContent = this._tracked_style.css;
|
|
3932
3933
|
if (this._server) {
|
|
3933
|
-
this.__replaceChildren(
|
|
3934
|
+
this.__replaceChildren(head, [...this._tracked_head_children, styleElem]);
|
|
3934
3935
|
}
|
|
3935
|
-
else if (styleElem.parentNode !==
|
|
3936
|
-
|
|
3936
|
+
else if (styleElem.parentNode !== head) {
|
|
3937
|
+
head.appendChild(styleElem);
|
|
3937
3938
|
}
|
|
3938
3939
|
}
|
|
3940
|
+
if (!this.document.head) {
|
|
3941
|
+
this.document.documentElement.insertBefore(head, this.document.body);
|
|
3942
|
+
}
|
|
3939
3943
|
}
|
|
3940
3944
|
/** @internal */
|
|
3941
3945
|
_createElement(node, stack) {
|
|
@@ -4139,4 +4143,4 @@ class _DOMRenderer extends _Renderer {
|
|
|
4139
4143
|
}
|
|
4140
4144
|
|
|
4141
4145
|
export { DOMNativeNode as D, _DOMRenderer as _ };
|
|
4142
|
-
//# sourceMappingURL=common-
|
|
4146
|
+
//# sourceMappingURL=common-Cmc9qJmA.mjs.map
|