Use shadowRoot if inside of an iframe and don't use it if outside

This makes sure it will work everywhere
This commit is contained in:
apolinario
2022-12-06 15:13:41 +01:00
committed by GitHub
parent 2eb5f103ab
commit 1075819b16

View File

@@ -1,5 +1,5 @@
function gradioApp(){
return document
return !!document.getElementsByTagName('gradio-app')[0].shadowRoot ? document.getElementsByTagName('gradio-app')[0].shadowRoot : document
}
function get_uiCurrentTab() {