aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/script.js b/script.js
index d9424de9..49b6c557 100644
--- a/script.js
+++ b/script.js
@@ -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() {