returnValue property

String get returnValue
override

The returnValue property of the BeforeUnloadEvent interface, when set to a truthy value, triggers a browser-generated confirmation dialog asking users to confirm if they really want to leave the page when they try to close or reload it, or navigate somewhere else. This is intended to help prevent loss of unsaved data.

Note: returnValue is a legacy feature, and best practice is to trigger the dialog by invoking Event.preventDefault on the BeforeUnloadEvent object, while also setting returnValue to support legacy cases. See the Window.beforeunload_event event reference for detailed up-to-date guidance.

Implementation

external String get returnValue;
set returnValue (String value)
override

Implementation

external set returnValue(String value);