CookieFilter

Represents a filter for fetching cookies. Described in https://w3c.github.io/webdriver-bidi/#command-storage-getCookies

Constructor

new CookieFilter()

Methods

domain(domain) → {CookieFilter}

Sets the domain for the cookie.

Parameters:
NameTypeDescription
domainstring

The domain to set.

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

expiry(expiry) → {CookieFilter}

Sets the expiry value.

Parameters:
NameTypeDescription
expirynumber

The expiry value.

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

httpOnly(httpOnly) → {CookieFilter}

Sets the httpOnly flag for the cookie filter.

Parameters:
NameTypeDescription
httpOnlyboolean

The value to set for the httpOnly flag.

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

name(name) → {CookieFilter}

Sets the name of the cookie.

Parameters:
NameTypeDescription
namestring

The name of the cookie.

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

path(path) → {CookieFilter}

Sets the url path for the cookie to be fetched.

Parameters:
NameTypeDescription
pathstring

The url path for the cookie to be fetched.

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

sameSite(sameSite) → {CookieFilter}

Sets the SameSite attribute for the cookie.

Parameters:
NameTypeDescription
sameSiteSameSite

The SameSite value to be set for the cookie.

Throws:
  • If the provided sameSite value is not an instance of SameSite.
Type
Error
Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter

secure(secure) → {CookieFilter}

Sets the flag to fetch secure cookies.

Parameters:
NameTypeDescription
secureboolean

Whether the cookie fetched should be secure only or not.

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

size(size) → {CookieFilter}

Sets the size of the cookie to be fetched.

Parameters:
NameTypeDescription
sizenumber

The size of the cookie.

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

value(value) → {CookieFilter}

Sets the value of the cookie.

Parameters:
NameTypeDescription
valueBytesValue

The value to be set. Must be an instance of BytesValue.

Throws:
  • If the value is not an instance of BytesValue.
Type
Error
Returns:
  • The updated CookieFilter instance for chaining.
Type: 
CookieFilter