1

Is there a way to bar the user from clicking the "X" button on a browser to exit the app forcefully if certain boolean variable in the app is not TRUE?

I feel this has to do with connecting Shiny with Javascript somehow. Saw an example that display a popup prompt when the user closes the browswer here. But in this example, the user can still forcefully leave the browser.

But I don't know anything about Javascript to go on from there.

Any advice would be much appreciated.

Thanks,

Tristan Tran
  • 1,351
  • 1
  • 10
  • 36
  • 3
    You cannot disallow a user from closing the browser window. That would be a huge security concern. It's not something that the browser lets you do. – DeanAttali Jan 02 '20 at 06:34

0 Answers0