PartialCookie

Represents a partial cookie used to set cookies. Described in https://w3c.github.io/webdriver-bidi/#command-storage-setCookie.

Constructor

new PartialCookie(name, value, domain)

Represents a partial cookie.

Parameters:
NameTypeDescription
namestring

The name of the cookie.

valueBytesValue

The value of the cookie as an instance of BytesValue.

domainstring

The domain of the cookie.

Methods

expiry(expiry) → {PartialCookie}

Sets the expiry for the cookie.

Parameters:
NameTypeDescription
expirynumber

The expiry time of the cookie.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie

httpOnly(httpOnly) → {PartialCookie}

Sets the httpOnly flag for the cookie.

Parameters:
NameTypeDescription
httpOnlyboolean

The value to set for the httpOnly flag.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie

path(path) → {PartialCookie}

Sets the path for the cookie.

Parameters:
NameTypeDescription
pathstring

The path for the cookie.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie

sameSite(sameSite) → {PartialCookie}

Sets the SameSite attribute for the cookie.

Parameters:
NameTypeDescription
sameSiteSameSite

The SameSite attribute value for the cookie.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie

secure(secure) → {PartialCookie}

Sets the secure flag for the cookie.

Parameters:
NameTypeDescription
secureboolean

Indicates whether the cookie should only be sent over secure connections.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie

size(size) → {PartialCookie}

Sets the size of the cookie.

Parameters:
NameTypeDescription
sizenumber

The size of the cookie.

Returns:
  • The updated PartialCookie instance for chaining.
Type: 
PartialCookie