R Shiny: running a standalone browser window when calling runApp -
i'm running standalone r shiny app on windows in browser setting options(browser=path/to/browser/exe) , using shiny::runapp("path/to/app", launch.browser=true). browser support msie (default), but, if available, can chrome or firefox. goal run app if using --app= command line option standalone chrome app, i.e. in new browser window, stripped of menubar , toolbar, preserves titlebar (so not in "kiosk" mode), and, if possible, without other contents of browser (like opened tabs or home page). what's best way that?
for instance, using javascript, 1 call:
window.open("http://127.0.0.1:5555/", "myapp", "menubar=no,toolbar=no,location=no"); which job (+/- inconsistent support location=no, i.e. disabling address bar, can live with). now, how using r shiny?
it's not elegant, can start internet explorer com interface using e.g. package rdcomclient.
as documentation states, launch.browser argument can function given url of app, can create object there:
library(rdcomclient) runapp("path/to/app", launch.browser = function(shinyurl) { ieapp <- comcreate("internetexplorer.application") ieapp[["menubar"]] = false ieapp[["statusbar"]] = false ieapp[["toolbar"]] = false ieapp[["visible"]] = true ieapp$navigate(shinyurl) })
Comments
Post a Comment