mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-06 02:30:30 -08:00
fix overriding getElementById on document
This commit is contained in:
parent
b2c428a095
commit
22bfcf135f
1 changed files with 1 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ function gradioApp() {
|
||||||
const elems = document.getElementsByTagName('gradio-app')
|
const elems = document.getElementsByTagName('gradio-app')
|
||||||
const elem = elems.length == 0 ? document : elems[0]
|
const elem = elems.length == 0 ? document : elems[0]
|
||||||
|
|
||||||
elem.getElementById = function(id){ return document.getElementById(id) }
|
if (elem !== document) elem.getElementById = function(id){ return document.getElementById(id) }
|
||||||
return elem.shadowRoot ? elem.shadowRoot : elem
|
return elem.shadowRoot ? elem.shadowRoot : elem
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue