CookieData 接口
🌐 CookieData interface
用于在浏览器级 cookies API 中设置 cookies 的 Cookie 参数对象。
🌐 Cookie parameter object used to set cookies in the browser-level cookies API.
语法
🌐 Signature
export interface CookieData
属性
🌐 Properties
|
属性 🌐 Property |
修饰符 🌐 Modifiers |
类型 🌐 Type |
描述 🌐 Description |
默认 🌐 Default |
|---|---|---|---|---|
|
domain |
string |
Cookie 域。 🌐 Cookie domain. | ||
|
expires |
|
number |
Cookie 过期日期,如果未设置会话 cookie 🌐 Cookie expiration date, session cookie if not set | |
|
httpOnly |
|
boolean |
如果 cookie 仅限 http,则为 True。 🌐 True if cookie is http-only. | |
|
name |
string |
Cookie 名称。 🌐 Cookie name. | ||
|
partitionKey |
|
[CookiePartitionKey](./puppeteer.cookiepartitionkey.md) |弦 |
Cookie 分区键。在 Chrome 中,它与分区 cookie 可用的顶层站点匹配。在 Firefox 中,它与 PartitionKey 中的源来源匹配。 🌐 Cookie partition key. In Chrome, it matches the top-level site the partitioned cookie is available in. In Firefox, it matches the source origin in the PartitionKey. | |
|
path |
|
string |
Cookie 路径。 🌐 Cookie path. | |
|
priority |
|
Cookie 优先级。仅在 Chrome 中支持。 🌐 Cookie Priority. Supported only in Chrome. | ||
|
sameSite |
|
Cookie SameSite 类型。 🌐 Cookie SameSite type. | ||
|
secure |
|
boolean |
如果 cookie 是安全的,则为 True。 🌐 True if cookie is secure. | |
|
sourceScheme |
|
Cookie 源方案类型。仅在 Chrome 中支持。 🌐 Cookie source scheme type. Supported only in Chrome. | ||
|
value |
string |
Cookie 值。 🌐 Cookie value. |