Skip to main content
Version: Next

CookieData interface

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 domain.

expires

optional

number

Cookie expiration date, session cookie if not set

httpOnly

optional

boolean

True if cookie is http-only.

name

string

Cookie name.

partitionKey

optional

CookiePartitionKey | string

Cookie partition key. In Chrome, it matches the top-level site the partitioned cookie is available in. In Firefox, it matches the source origin (https://w3c.github.io/webdriver-bidi/\#type-storage-PartitionKey).

path

optional

string

Cookie path.

priority

optional

CookiePriority

Cookie Priority. Supported only in Chrome.

sameParty

optional

boolean

True if cookie is SameParty. Supported only in Chrome.

sameSite

optional

CookieSameSite

Cookie SameSite type.

secure

optional

boolean

True if cookie is secure.

sourceScheme

optional

CookieSourceScheme

Cookie source scheme type. Supported only in Chrome.

value

string

Cookie value.