Enable JavaScript with Shiny custom URL

Hi there,
I'm running a ShinyApp with a bit of JavaScript (eg : to get user's geolocation).
We are using Shiny custom URL for this app so the orignal webpage is displayed inside an iframe when you visit our app through the custom URL.
As far as I understood, running JavaScript inside an iframe is not allowed, which causes loss of functionalities in our app, like geolocation. Is there a way to allow JavaScript in this iframe from my original app.R code ? Or another way to get my scripts running ?
Thanks for your help.