Expand locations for files viewed with rstudio::viewer

I'm curious about the limitations on the possible locations for files viewed in the RStudio viewer pane via rstudioapi::viewer. Currently the documentation says:

The application URL must either be served from localhost or be a path to a file within the R session temporary directory. If the URL doesn't conform to these requirements it is displayed within a standard browser window.

Is there a reason why we cannot view static .html files in locations other than R session temporary directories in the RStudio viewer? If not, I'd be interested in rstudioapi::viewer's functionality being expanded slightly to be able to do this.

1 Like

Yeah, this would be super nice. I spent the better part of a day trying to figure out why I couldn't get it to work before I read the docs more carefully.