From 91742ce7a6dcbc780a41dc867673fcdc54f4784e Mon Sep 17 00:00:00 2001 From: Chris Mills Date: Fri, 13 Oct 2023 08:05:38 +0100 Subject: [PATCH] Update Chrome beforeunload dialog control behavior (#20942) * Update Chrome beforeunload dialog control behavior * Clarify empty string returnValue behavior change in Chromium * update deprecated status for consistency, add remove data * Make information about returnValue consistent * activation works with any truthy value * Update api/BeforeUnloadEvent.json Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu * Update api/BeforeUnloadEvent.json Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu --------- Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu --- api/BeforeUnloadEvent.json | 16 ++++++++++++---- api/Window.json | 37 ++++++++++++++++++++++++------------- 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/api/BeforeUnloadEvent.json b/api/BeforeUnloadEvent.json index 38df09c5335213..ae621f44fb5f5c 100644 --- a/api/BeforeUnloadEvent.json +++ b/api/BeforeUnloadEvent.json @@ -44,9 +44,17 @@ "__compat": { "spec_url": "https://html.spec.whatwg.org/multipage/browsing-the-web.html#dom-beforeunloadevent-returnvalue", "support": { - "chrome": { - "version_added": "30" - }, + "chrome": [ + { + "version_added": "119" + }, + { + "version_added": "30", + "version_removed": "119", + "partial_implementation": true, + "notes": "Before Chrome 119, an empty string incorrectly activated the confirmation dialog." + } + ], "chrome_android": "mirror", "deno": { "version_added": false @@ -76,7 +84,7 @@ "status": { "experimental": false, "standard_track": true, - "deprecated": false + "deprecated": true } } }, diff --git a/api/Window.json b/api/Window.json index 18d0d4e4fd8fe1..81cafb02edd4c6 100644 --- a/api/Window.json +++ b/api/Window.json @@ -356,18 +356,24 @@ }, "event_returnvalue_activation": { "__compat": { - "description": "Activation using event.returnValue = \"string\";", + "description": "Activation using event.returnValue = ;", "support": { - "chrome": { - "version_added": "30" - }, + "chrome": [ + { + "version_added": "119" + }, + { + "version_added": "30", + "version_removed": "118", + "partial_implementation": true, + "notes": "Incorrectly activated the dialog with an empty string value." + } + ], "chrome_android": "mirror", "deno": { "version_added": false }, - "edge": { - "version_added": "12" - }, + "edge": "mirror", "firefox": { "version_added": "6" }, @@ -434,16 +440,21 @@ "description": "Activation using event.preventDefault()", "support": { "chrome": { - "version_added": false + "version_added": "119" }, "chrome_android": "mirror", "deno": { "version_added": false }, - "edge": { - "version_added": "12", - "version_removed": "79" - }, + "edge": [ + { + "version_added": "119" + }, + { + "version_added": "12", + "version_removed": "79" + } + ], "firefox": { "version_added": "6" }, @@ -472,7 +483,7 @@ }, "return_string_activation": { "__compat": { - "description": "Activation using return \"string\";", + "description": "Activation using return ;", "support": { "chrome": { "version_added": "1"