Title: Ask Reuben 74 - Browser Close Post by: Reuben B. on June 17, 2021, 04:40:11 am When running a Genero application through Genero Desktop Client, the GDC is a process running on the front-end operating system and has to respect the rules of that operating system. When running a Genero application through Genero Browser Client, we are similarly bound by the rules that browsers apply. A place where you will encounter these rules is what happens when you attempt to close a browser tab by clicking the close button in the browser tab (or File->Close Tab).
Whenever I attempt to explain browser rules, I like to ask the question … "What would a malicious website developer do if they could break the rule you are asking me to break ?" … so whenever someone asks “I want to prevent the user closing a browser tab unless …”, I’ll say “what would a malicious website developer do if they were able to write code that meant you were unable to close a browser tab?” What happens when user closes a browser tab? Why do sometimes you get a warning dialog, and sometimes you don’t? What can we do when the program exits? Read more at https://4js.com/ask-reuben/ig-74/ |