feat: add API to check if session is persistent (#22622)
This commit is contained in:
parent
19314d3caf
commit
34e004015d
4 changed files with 37 additions and 0 deletions
|
@ -439,6 +439,13 @@ example `"en-US,fr,de,ko,zh-CN,ja"`.
|
|||
This doesn't affect existing `WebContents`, and each `WebContents` can use
|
||||
`webContents.setUserAgent` to override the session-wide user agent.
|
||||
|
||||
#### `ses.isPersistent()`
|
||||
|
||||
Returns `Boolean` - Whether or not this session is a persistent one. The default
|
||||
`webContents` session of a `BrowserWindow` is persistent. When creating a session
|
||||
from a partition, session prefixed with `persist:` will be persistent, while others
|
||||
will be temporary.
|
||||
|
||||
#### `ses.getUserAgent()`
|
||||
|
||||
Returns `String` - The user agent for this session.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue