CookieParam 接口
¥CookieParam interface
用于在页面级 cookies API 中设置 cookies 的 Cookie 参数对象。
¥Cookie parameter object used to set cookies in the page-level cookies API.
签名
¥Signature
export interface CookieParam
属性
¥Properties
属性 | 修饰符 | 类型 | 描述 | 默认 |
|---|---|---|---|---|
| domain |
| string | Cookie 域。 | |
| expires |
| 数字 | Cookie 过期日期,如果未设置会话 cookie | |
| httpOnly |
| boolean | 如果 cookie 仅限 http,则为 True。 | |
| name | string | Cookie 名称。 | ||
| partitionKey |
| CookiePartitionKey | 字符串 | Cookie 分区键。在 Chrome 中,它与分区 cookie 所在的顶层站点匹配。在 Firefox 中,它与 PartitionKey 中的源源匹配。 | |
| path |
| string | Cookie 路径。 | |
| priority |
| Cookie 优先。仅在 Chrome 中受支持。 | ||
| sameParty |
| boolean | 如果 cookie 是 SameParty,则为 true。仅在 Chrome 中受支持。 | |
| sameSite |
| Cookie SameSite 类型。 | ||
| secure |
| boolean | 如果 cookie 是安全的,则为 True。 | |
| sourceScheme |
| Cookie 源方案类型。仅在 Chrome 中受支持。 | ||
| url |
| string | 与 cookie 设置关联的请求 URI。该值会影响创建的 cookie 的默认域、路径和源方案值。 | |
| value | string | Cookie 值。 |