JavaScript - How to enable/disable google chrome close button

Asked By bhanupratap singh on 25-Aug-16 07:40 PM
I want to enable/disable the button of google chrome browser. I want to prevent user not use close the browser at any cost to an time period.
Thanks
Robbe Morris replied to bhanupratap singh on 26-Aug-16 09:59 AM
No can do

Browsers do not permit you to dominate the user's desktop in this fashion.  Even if your purpose is legit.  Assuming it is legit and you have control over the PCs being used, you could write a small windows app with an web browser control embedded on the form.  Then, you'd essentially have your own browser and can do what you want with it.
bhanupratap singh replied to Robbe Morris on 26-Aug-16 12:32 PM
Actually what happened ! When I open many tabs and want to close a tab but accidently clicking on close button (X), it closes all tabs. That is why I need to disable (X) button. When user closes tab one by one then at last (X) button should be visible to close the browser.
Thanks

Robbe Morris replied to bhanupratap singh on 26-Aug-16 01:27 PM
There is a specific Setting in the user's browser that they can set this functionality.  Chrome doesn't let the web site developer program to alter these settings.