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> {
const parser = new DOMParser();
if (head_string) {
const head_html = parser.parseFromString(head_string, "text/html").head
.firstChild;
if (head_html) {
document.head.append(head_html);
const parsed_head_html = Array.from(
parser.parseFromString(head_string, "text/html").head.children
);
if (parsed_head_html) {
for (let head_element of parsed_head_html) {
document.head.append(head_element);
}
}
}
}