initial gradio 3.22 support

This commit is contained in:
AUTOMATIC
2023-03-20 16:09:36 +03:00
parent a9fed7c364
commit 9f0da9f6ed
15 changed files with 299 additions and 635 deletions

View File

@@ -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() {