aboutsummaryrefslogtreecommitdiffstats
path: root/script.js
diff options
context:
space:
mode:
authorKarun <karun.ellango7@gmail.com>2023-03-25 09:12:55 +0000
committerGitHub <noreply@github.com>2023-03-25 09:12:55 +0000
commit63a2f8d8225228a52b3ca7f19d2ba1fd07a6234b (patch)
tree9a7c38070d83b409895704125525dfc70cc21215 /script.js
parentca2b8faa83076a21dd14c974f03f88eb6da57485 (diff)
parent70615448b2ef3285dba9bb1992974cb1eaf10995 (diff)
downloadstable-diffusion-webui-gfx803-63a2f8d8225228a52b3ca7f19d2ba1fd07a6234b.tar.gz
stable-diffusion-webui-gfx803-63a2f8d8225228a52b3ca7f19d2ba1fd07a6234b.tar.bz2
stable-diffusion-webui-gfx803-63a2f8d8225228a52b3ca7f19d2ba1fd07a6234b.zip
Merge branch 'master' into master
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() {