mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-23 11:39:17 +08:00
fix
This commit is contained in:
parent
1751f14c1b
commit
86783c834d
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user