Document cookie changed event
This commit is contained in:
parent
d83534d513
commit
96e48ac13c
1 changed files with 21 additions and 0 deletions
|
@ -395,6 +395,27 @@ session.defaultSession.cookies.set(cookie, (error) => {
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Instance Events
|
||||||
|
|
||||||
|
The following events are available on instances of `Cookies`:
|
||||||
|
|
||||||
|
#### Event: 'changed'
|
||||||
|
|
||||||
|
* `event` Event
|
||||||
|
* `cookie` Object - 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.
|
||||||
|
* `overwrite` - The cookie was automatically removed due to an insert
|
||||||
|
operation that overwrote it.
|
||||||
|
* `expired` - The cookie was automatically removed as it expired.
|
||||||
|
* `evicted` - The cookie was automatically evicted during garbage collection.
|
||||||
|
* `expired-overwrite` - The cookie was overwritten with an already-expired
|
||||||
|
expiration date.
|
||||||
|
* `removed` Boolean - `true` if the cookie was removed, `false` otherwise.
|
||||||
|
|
||||||
|
Emitted when a cookie is changed because it was added, edited, removed, or
|
||||||
|
expired.
|
||||||
|
|
||||||
### Instance Methods
|
### Instance Methods
|
||||||
|
|
||||||
The following methods are available on instances of `Cookies`:
|
The following methods are available on instances of `Cookies`:
|
||||||
|
|
Loading…
Add table
Reference in a new issue