mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-03 10:50:23 +00:00
fix overriding getElementById on document
This commit is contained in:
@@ -2,7 +2,7 @@ function gradioApp() {
|
||||
const elems = document.getElementsByTagName('gradio-app')
|
||||
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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user