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