I have seen some sites that apparently execute some type of browser function that prompts the user if he/she wants to leave the page because there is a form not submitted:
"This page is asking you to confirm that you want to leave - data you have entered may not be saved."
I know this can be programmed in JS, but is there a native function or option that suggests the browser to detect this kind of scenarios?
I believe there is one because I have seen several websites (like facebook) reacting in the same way and they all seem to use this kind of browser option.
like autocomplete="on / off"
allows the browser to fill up a form or not automatically
Thanks