[Edit] Add mct-before-unload directive
Add directive for exposing expressions which should be evaluated for the browser's onbeforeunload event, to prevent user-initiated navigation from causing a loss of unsaved changes. WTD-1035.
This commit is contained in:
@@ -88,6 +88,13 @@ define(
|
||||
*/
|
||||
cancel: function () {
|
||||
return resolvePromise(undefined);
|
||||
},
|
||||
/**
|
||||
* Check if there are any unsaved changes.
|
||||
* @returns {boolean} true if there are unsaved changes
|
||||
*/
|
||||
dirty: function () {
|
||||
return cache.dirty();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user