Cookies
Last updated
Was this helpful?
Last updated
Was this helpful?
Returns all cookies associated with the address of the current browsing context’s active document.
RETURNS
Promise<[]>
EXAMPLES
SEE ALSO
Returns cookie based on the cookie name
PARAMETERS
name
: string - Name of the cookie object to be returned
RETURNS
EXAMPLES
SEE ALSO
Adds a single cookie to the cookie store associated with the active document’s address.
PARAMETERS
RETURNS
Promise<void>
EXAMPLES
SEE ALSO
Delete a cookie based on its name
PARAMETERS
propertyName
: string - Cookie name to delete
RETURNS
Promise<void>
EXAMPLES
SEE ALSO
Delete all cookies associated with the address of the current browsing context’s active document.
RETURNS
Promise<void>
EXAMPLES
SEE ALSO
An object defining the cookie.
PROPERTIES
name
: string - The name of the cookie.
value
: string - The cookie value.
path?
: string - The cookie path. Defaults to "/" if omitted when adding a cookie.
domain?
: string - The domain the cookie is visible to. Defaults to the current browsing context’s document’s URL domain if omitted when adding a cookie.
secure?
: boolean - Whether the cookie is a secure cookie. Defaults to false if omitted when adding a cookie.
httpOnly?
: boolean - Whether the cookie is an HTTP only cookie. Defaults to false if omitted when adding a cookie.
expiry?
: number - When the cookie expires, specified in seconds since Unix Epoch. Defaults to 20 years into the future if omitted when adding a cookie.
Promise<>
cookie
: - Cookie object to add in browser for current domain