Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Ask Reuben 74 - Browser Close  (Read 1034 times)
Reuben B.
Four Js
Posts: 935


« 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/

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines