diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-04-29 10:10:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-29 10:10:46 +0000 |
commit | 87535fcf292af8890520e7f346df0f41dd74353a (patch) | |
tree | 89c7f9ac26ae637f22f2db1efe69fb4aa51e9c70 /script.js | |
parent | 02e351880796422eac3bbaf7aa86332b588651ce (diff) | |
parent | 1ffb44b0b2c9cb5fb379274515772741a9c1dbaf (diff) | |
download | stable-diffusion-webui-gfx803-87535fcf292af8890520e7f346df0f41dd74353a.tar.gz stable-diffusion-webui-gfx803-87535fcf292af8890520e7f346df0f41dd74353a.tar.bz2 stable-diffusion-webui-gfx803-87535fcf292af8890520e7f346df0f41dd74353a.zip |
Merge branch 'dev' into Branch_AddNewFilenameGen
Diffstat (limited to 'script.js')
-rw-r--r-- | script.js | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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] + + if (elem !== document) elem.getElementById = function(id){ return document.getElementById(id) } + return elem.shadowRoot ? elem.shadowRoot : elem } function get_uiCurrentTab() { |