diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-03-20 13:09:36 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-03-25 06:00:36 +0000 |
commit | 9f0da9f6edfb9be1d69ba3492a61d96db769307b (patch) | |
tree | 4cac745943f5bc425586c81bdda2cdef195111b9 /script.js | |
parent | a9fed7c364061ae6efb37f797b6b522cb3cf7aa2 (diff) | |
download | stable-diffusion-webui-gfx803-9f0da9f6edfb9be1d69ba3492a61d96db769307b.tar.gz stable-diffusion-webui-gfx803-9f0da9f6edfb9be1d69ba3492a61d96db769307b.tar.bz2 stable-diffusion-webui-gfx803-9f0da9f6edfb9be1d69ba3492a61d96db769307b.zip |
initial gradio 3.22 support
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] + + elem.getElementById = function(id){ return document.getElementById(id) } + return elem.shadowRoot ? elem.shadowRoot : elem } function get_uiCurrentTab() { |