aboutsummaryrefslogtreecommitdiffstats
path: root/script.js
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-03-25 09:08:24 +0000
committerGitHub <noreply@github.com>2023-03-25 09:08:24 +0000
commit8dbe793af53194ff3054bfbc9529a10f961bdbd3 (patch)
tree087f31c96c6b0280c75cfca4380638cde72ff90e /script.js
parent8e3ced73a8c8f435809de544e0574da265177289 (diff)
parent70615448b2ef3285dba9bb1992974cb1eaf10995 (diff)
downloadstable-diffusion-webui-gfx803-8dbe793af53194ff3054bfbc9529a10f961bdbd3.tar.gz
stable-diffusion-webui-gfx803-8dbe793af53194ff3054bfbc9529a10f961bdbd3.tar.bz2
stable-diffusion-webui-gfx803-8dbe793af53194ff3054bfbc9529a10f961bdbd3.zip
Merge branch 'master' into extra-network-info
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() {