=================
BeforeUnload Tool
=================
The BeforeUnload tool will check forms when navigating away from a
page and will warn a user if they are about to lost changes and give
them the option to remain editing the page.
How to use the tool
===================
The tool will install itself automatically provided the javascript
is loaded, and provided no other handler has been installed for the
window.onbeforeunload event.
To test for the presence of the tool and use it if it is present use
the following code::
var beforeunloadTool = window.onbeforeunload && window.onbeforeunload.tool;
if (beforeunloadTool) { ... };
Although the tool is installed by default, it does not check any
forms unless they are added. Use the addForm method to add a single
form or addForms method to add multiple forms. When a form is added,
its onsubmit method will be hooked by the tool: if your form needs to
perform its own onsubmit processing you must replace this event
after calling addForm.
The following input field types may be checked::