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

This makes sure it will work everywhere
master
apolinario 3 years ago committed by GitHub
parent 2eb5f103ab
commit 1075819b16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save