import Cookie from 'chrome-remote-interface-extra/lib/network/Cookie.js'Cookie
An abstraction around using the CDP and Cookies
Static Method Summary
| Static Public Methods | ||
| public static |
fromString(cookieString: string, networkManager: NetworkManager, additionalProps: Object): Cookie Creates a new Cookie from the supplied string |
|
Constructor Summary
| Public Constructor | ||
| public |
constructor(cookie: CDPCookie, networkManager: NetworkManager) |
|
Member Summary
| Private Members | ||
| private |
|
|
| private |
|
|
Method Summary
| Public Methods | ||
| public |
deleteCookie(forURL: string): Promise<void> Deletes this browser cookie by matching name and url or domain/path pair |
|
| public |
Cookie domain |
|
| public |
Cookie expiration date as the number of seconds since the UNIX epox |
|
| public |
True if the cookie is http-only |
|
| public |
async modifyCookie(modifications: CookieParam): Promise<boolean> Modifies this cookie with the given cookie data; may overwrite equivalent cookies if they exist |
|
| public |
Cookie name |
|
| public |
Cookie path |
|
| public |
Represents the cookie's 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies One of: Strict, Lax |
|
| public |
True if the cookie is secure (HTTPS) |
|
| public |
True in case of session cookie |
|
| public |
|
|
| public |
The size of the cookie |
|
| public |
|
|
| public |
Cookie value |
|
Static Public Methods
public static fromString(cookieString: string, networkManager: NetworkManager, additionalProps: Object): Cookie source
Creates a new Cookie from the supplied string
Params:
| Name | Type | Attribute | Description |
| cookieString | string |
|
String representation of a cookie 'name=value' |
| networkManager | NetworkManager |
|
|
| additionalProps | Object |
|
Additional values for the cookie if any |
Public Constructors
public constructor(cookie: CDPCookie, networkManager: NetworkManager) source
Params:
| Name | Type | Attribute | Description |
| cookie | CDPCookie |
|
|
| networkManager | NetworkManager |
|
Public Methods
public deleteCookie(forURL: string): Promise<void> source
Deletes this browser cookie by matching name and url or domain/path pair
Params:
| Name | Type | Attribute | Description |
| forURL | string |
|
public async modifyCookie(modifications: CookieParam): Promise<boolean> source
Modifies this cookie with the given cookie data; may overwrite equivalent cookies if they exist
Params:
| Name | Type | Attribute | Description |
| modifications | CookieParam |
|
public sameSite(): string source
Represents the cookie's 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies One of: Strict, Lax
