diff options
author | missionfloyd <missionfloyd@users.noreply.github.com> | 2023-03-26 21:47:05 -0600 |
---|---|---|
committer | missionfloyd <missionfloyd@users.noreply.github.com> | 2023-03-26 21:47:05 -0600 |
commit | efac2cf1ab6645f3f5134158c1401c6305c2ffea (patch) | |
tree | 24b69e980c07d03618a6e5b2447704cdb30a6a20 /script.js | |
parent | 1d096ed1456c9b9b662477839853621848705e68 (diff) | |
parent | a336c7fe233fa7dff062f5187c0f4d01ab26e80b (diff) |
Merge branch 'extra-network-preview-lazyload' of https://github.com/missionfloyd/stable-diffusion-webui into extra-network-preview-lazyload
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() { |