aboutsummaryrefslogtreecommitdiffstats
path: root/script.js
diff options
context:
space:
mode:
authorRemixer Dec <6587642+remixer-dec@users.noreply.github.com>2023-03-25 14:23:34 +0000
committerRemixer Dec <6587642+remixer-dec@users.noreply.github.com>2023-03-25 14:23:34 +0000
commit22bfcf135f8df26f55e01b744bcff748541d44db (patch)
treea19e8936ad91f839010ec364600bab5bd946156d /script.js
parentb2c428a095842415c7c9f466724c8cd1ff924cd0 (diff)
downloadstable-diffusion-webui-gfx803-22bfcf135f8df26f55e01b744bcff748541d44db.tar.gz
stable-diffusion-webui-gfx803-22bfcf135f8df26f55e01b744bcff748541d44db.tar.bz2
stable-diffusion-webui-gfx803-22bfcf135f8df26f55e01b744bcff748541d44db.zip
fix overriding getElementById on document
Diffstat (limited to 'script.js')
-rw-r--r--script.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/script.js b/script.js
index 978b948f..1b9a443f 100644
--- a/script.js
+++ b/script.js
@@ -2,7 +2,7 @@ function gradioApp() {
const elems = document.getElementsByTagName('gradio-app')
const elem = elems.length == 0 ? document : elems[0]
- elem.getElementById = function(id){ return document.getElementById(id) }
+ if (elem !== document) elem.getElementById = function(id){ return document.getElementById(id) }
return elem.shadowRoot ? elem.shadowRoot : elem
}