rstudio / rstudioapi

Safely access RStudio's API (when available)
http://rstudio.github.io/rstudioapi
Other
165 stars 35 forks source link

detect if viewer is active #210

Open etiennebacher opened 3 years ago

etiennebacher commented 3 years ago

Hi, I'm developing a package that allows the user to create an HTML page. One of the functions previews the page in the viewer (similarly to blogdown::serve_site() for instance), and I would like to create a test for this function, but I can't figure out how to do so. Is there a way to know if the viewer is active, i.e if there is some content in it?