Working without iframe


#1

Hi!

Is it possible to add opportunity that allows shiny app working as “native” app, i mean without iframe surroundings?


#2

Hi @Alexey_Kuzmrnkov,

There is an option to hide the navbar using hide-navbar: true.
See https://www.shinyproxy.io/configuration/#general

This is typically used when Shiny apps are integrated within larger applications.

Hope this helps.

Best,
Tobias


#3

Thank you, Tobias!

I know about this cool option. But problem is when i use shinyproxy, some js code doesn work (f.e. pseudofull screen on leaflet map in shiny app). And hide navbar doesn t solve this problem. Shiny proxy “paste” my app in iframe object. Is it possible to run shiny app without iframe around it?

Alexey


#4

Hi @Alexey_Kuzmrnkov,

There are two issues that prevent the usage of the shiny app outside of an iframe:

  1. The url is generated dynamically, it cannot be determined beforehand
  2. There is a javascript running alongside the iframe that sends heartbeats to the server, to prevent the app from greying out.

I believe some modifications could allow usage of the app without iframe. Possibly via the addition of some RESTful calls to allocate/release apps.

Alternatively, there is an (experimental) workaround you could try:

  1. Retrieve the html from the url /app/yourappname and parse the generated iframe url from it
  2. Set heartbeat-timeout very high in application.yml, because the heartbeat script won’t be running

Regards,
Frederick