mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
fix: wrong cause and removed flag in cookie change listener (#49103)
This commit is contained in:
@@ -51,7 +51,12 @@ Returns:
|
||||
* `event` Event
|
||||
* `cookie` [Cookie](structures/cookie.md) - The cookie that was changed.
|
||||
* `cause` string - The cause of the change with one of the following values:
|
||||
* `explicit` - The cookie was changed directly by a consumer's action.
|
||||
* `inserted` - The cookie was inserted.
|
||||
* `inserted-no-change-overwrite` - The newly inserted cookie overwrote a cookie but
|
||||
did not result in any change. For example, inserting an identical cookie will produce this cause.
|
||||
* `inserted-no-value-change-overwrite` - The newly inserted cookie overwrote a cookie but
|
||||
did not result in any value change, but it's web observable (e.g. updates the expiry).
|
||||
* `explicit` - The cookie was deleted directly by a consumer's action.
|
||||
* `overwrite` - The cookie was automatically removed due to an insert
|
||||
operation that overwrote it.
|
||||
* `expired` - The cookie was automatically removed as it expired.
|
||||
|
||||
@@ -30,6 +30,14 @@ Previously, PDF resources created a separate guest [WebContents](https://www.ele
|
||||
|
||||
Under the hood, Chromium [enabled](https://chromium-review.googlesource.com/c/chromium/src/+/7239572) a feature that changes PDFs to use out-of-process iframes (OOPIFs) instead of the `MimeHandlerViewGuest` extension.
|
||||
|
||||
### Behavior Changed: Updated Cookie Change Cause in the Cookie 'changed' Event
|
||||
|
||||
We have updated the [cookie](https://www.electronjs.org/docs/latest/api/cookies#event-changed) change cause in the cookie 'changed' event.
|
||||
When a new cookie is set, the change cause is `inserted`.
|
||||
When a cookie is deleted, the change cause remains `explicit`.
|
||||
When the cookie being set is identical to an existing one (same name, domain, path, and value, with no actual changes), the change cause is `inserted-no-change-overwrite`.
|
||||
When the value of the cookie being set remains unchanged but some of its attributes are updated, such as the expiration attribute, the change cause will be `inserted-no-value-change-overwrite`.
|
||||
|
||||
## Planned Breaking API Changes (40.0)
|
||||
|
||||
### Deprecated: `clipboard` API access from renderer processes
|
||||
|
||||
Reference in New Issue
Block a user