From Xojo Documentation

Property (As String )
aWebSession.ConfirmMessage = newStringValue
StringValue = aWebSession.ConfirmMessage

New in 2011r2

Supported for all project types and targets.

The message that is displayed when the user leaves the app.


The app cannot prevent the user from leaving, but this message will allow the user to cancel whatever action they took to leave the app (such as using the back button or changing the URL). If this property is empty, no message will be displayed.

On Firefox 4, a generic message is used in place of the specific text specified here.

Safari 7.0.5 on OS X 10.9 (Mavericks) has a bug that prevents this message from appearing if the user enters or chooses a new URL. The message does appear if they close the tab/browser or use the back button.