💄 for the beforeunload handler.
Returning text in beforeunload handler should prevent the close instead of allow the close.
This commit is contained in:
parent
34e1800716
commit
b1f30c1eb6
1 changed files with 1 additions and 2 deletions
|
@ -13,8 +13,7 @@ void AtomJavaScriptDialogManager::RunBeforeUnloadDialog(
|
||||||
const string16& message_text,
|
const string16& message_text,
|
||||||
bool is_reload,
|
bool is_reload,
|
||||||
const DialogClosedCallback& callback) {
|
const DialogClosedCallback& callback) {
|
||||||
|
bool prevent_reload = !message_text.empty() ||
|
||||||
bool prevent_reload = message_text.empty() ||
|
|
||||||
message_text == ASCIIToUTF16("false");
|
message_text == ASCIIToUTF16("false");
|
||||||
callback.Run(!prevent_reload, message_text);
|
callback.Run(!prevent_reload, message_text);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue