This commit is contained in:
Dawood 2023-12-03 18:46:42 +00:00
parent 1751f14c1b
commit 86783c834d

View File

@ -147,10 +147,14 @@
): Promise<void> { ): Promise<void> {
const parser = new DOMParser(); const parser = new DOMParser();
if (head_string) { if (head_string) {
const head_html = parser.parseFromString(head_string, "text/html").head const parsed_head_html = Array.from(
.firstChild; parser.parseFromString(head_string, "text/html").head.children
if (head_html) { );
document.head.append(head_html);
if (parsed_head_html) {
for (let head_element of parsed_head_html) {
document.head.append(head_element);
}
} }
} }
} }