未验证 提交 91ae48fd 编写于 作者: A AUTOMATIC1111 提交者: GitHub

Merge pull request #8921 from remixer-dec/fix-callstack-loop

fix overriding getElementById on document
......@@ -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
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册