We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d668452 commit 0375282Copy full SHA for 0375282
1 file changed
src/pkg/frontend.ts
@@ -3,6 +3,8 @@
3
export function addStyle(css: string): HTMLElement {
4
let dom = document.createElement('style');
5
dom.innerHTML = css;
6
- document.documentElement.appendChild(dom);
7
- return dom;
+ if (document.head) {
+ return document.head.appendChild(dom);
8
+ }
9
+ return document.documentElement.appendChild(dom);
10
}
0 commit comments