Skip to content

Commit

Permalink
Update Chrome beforeunload dialog control behavior (mdn#20942)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* Update api/BeforeUnloadEvent.json

Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu <[email protected]>

---------

Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu <[email protected]>
  • Loading branch information
2 people authored and Elchi3 committed Nov 14, 2023
1 parent dbf9f21 commit 91742ce
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 17 deletions.
16 changes: 12 additions & 4 deletions api/BeforeUnloadEvent.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -76,7 +84,7 @@
"status": {
"experimental": false,
"standard_track": true,
"deprecated": false
"deprecated": true
}
}
},
Expand Down
37 changes: 24 additions & 13 deletions api/Window.json
Original file line number Diff line number Diff line change
Expand Up @@ -356,18 +356,24 @@
},
"event_returnvalue_activation": {
"__compat": {
"description": "Activation using <code>event.returnValue = \"string\";</code>",
"description": "Activation using <code>event.returnValue = <any-truthy-value>;</code>",
"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"
},
Expand Down Expand Up @@ -434,16 +440,21 @@
"description": "Activation using <code>event.preventDefault()</code>",
"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"
},
Expand Down Expand Up @@ -472,7 +483,7 @@
},
"return_string_activation": {
"__compat": {
"description": "Activation using <code>return \"string\";</code>",
"description": "Activation using <code>return <any-truthy-value>;</code>",
"support": {
"chrome": {
"version_added": "1"
Expand Down

0 comments on commit 91742ce

Please sign in to comment.