Cookie 接口
表示一个 cookie 对象。
签名
export interface Cookie
属性
属性 | 修饰符 | 类型 | 描述 | 默认值 |
|---|---|---|---|---|
| domain | string | Cookie 域。 | ||
| expires | number | Cookie 过期日期,表示自 UNIX 纪元以来的秒数。对于会话 cookie,设置为 | ||
| httpOnly | boolean | 如果 cookie 是 http-only,则为 True。 | ||
| name | string | Cookie 名称。 | ||
| partitionKey |
| CookiePartitionKey | string | Cookie 分区键。在 Chrome 中,它是分区的 cookie 可用的顶级站点。在 Firefox 中,它与源 origin 匹配(https://w3c.github.io/webdriver-bidi/\#type-storage-PartitionKey)。 | |
| partitionKeyOpaque |
| boolean | 如果 cookie 分区键是不透明的,则为 True。仅在 Chrome 中受支持。 | |
| path | string | Cookie 路径。 | ||
| priority |
| Cookie 优先级。仅在 Chrome 中受支持。 | ||
| sameParty |
| boolean | 如果 cookie 是 SameParty,则为 True。仅在 Chrome 中受支持。 | |
| sameSite |
| Cookie SameSite 类型。 | ||
| secure | boolean | 如果 cookie 是安全的,则为 True。 | ||
| session | boolean | 如果是会话 cookie,则为 True。 | ||
| size | number | Cookie 大小。 | ||
| sourceScheme |
| Cookie 源 scheme 类型。仅在 Chrome 中受支持。 | ||
| value | string | Cookie 值。 |