unsaved_changes_confirmation

unsaved_changes_confirmation Request Message

This message enables or disables a browser confirmation dialog before unloading the app. It only works in full view mode.

Message Type

type messageType = 'unsaved_changes_confirmation';

Payload

type Payload = boolean; // true = show confirmation, false = disable

Example

// Turn on confirmation when the user has unsaved changes
sendZpaxMessage('unsaved_changes_confirmation', true);

// Disable the confirmation dialog
sendZpaxMessage('unsaved_changes_confirmation', false);

Use Cases

  • Alerting user about unsaved changes before navigating to a different app/feature in myzPAX

Related