aboutsummaryrefslogtreecommitdiffstats
path: root/script.js
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-03-20 13:09:36 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-03-20 13:09:36 +0000
commit8ea8e712c43e493a9c96dcec7dfbc036a8630c97 (patch)
treed546b3457cdd9bfa91252f8416e6b8ccb1791dcf /script.js
parent6a04a7f20fcc4a992ae017b06723e9ceffe17b37 (diff)
downloadstable-diffusion-webui-gfx803-8ea8e712c43e493a9c96dcec7dfbc036a8630c97.tar.gz
stable-diffusion-webui-gfx803-8ea8e712c43e493a9c96dcec7dfbc036a8630c97.tar.bz2
stable-diffusion-webui-gfx803-8ea8e712c43e493a9c96dcec7dfbc036a8630c97.zip
initial gradio 3.22 support
Diffstat (limited to 'script.js')
-rw-r--r--script.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/script.js b/script.js
index 97e0bfcf..978b948f 100644
--- a/script.js
+++ b/script.js
@@ -1,7 +1,9 @@
function gradioApp() {
const elems = document.getElementsByTagName('gradio-app')
- const gradioShadowRoot = elems.length == 0 ? null : elems[0].shadowRoot
- return !!gradioShadowRoot ? gradioShadowRoot : document;
+ const elem = elems.length == 0 ? document : elems[0]
+
+ elem.getElementById = function(id){ return document.getElementById(id) }
+ return elem.shadowRoot ? elem.shadowRoot : elem
}
function get_uiCurrentTab() {