Methods
(async) deleteCookies(cookieFilteropt, partitionopt) → {PartitionKey}
Deletes cookies based on the provided filter and partition.
Name | Type | Attributes | Description |
---|---|---|---|
cookieFilter | CookieFilter | <optional> | The filter to apply to the cookies. Must be an instance of CookieFilter. |
partition | BrowsingContextPartitionDescriptor | | <optional> | The partition to delete cookies from. Must be an instance of either BrowsingContextPartitionDescriptor or StorageKeyPartitionDescriptor. |
- Source
- If the provided parameters are not of the correct type.
- Type
- Error
- The partition key of the deleted cookies, if available.
- Type:
- PartitionKey
(async) getCookies(filteropt, partitionopt)
Retrieves cookies based on the provided filter and partition.
Name | Type | Attributes | Description |
---|---|---|---|
filter | CookieFilter | <optional> | The filter to apply to the cookies. |
partition | BrowsingContextPartitionDescriptor | | <optional> | The partition to retrieve cookies from. |
- Source
If the filter parameter is provided but is not an instance of CookieFilter.
- Type
- Error
If the partition parameter is provided but is not an instance of BrowsingContextPartitionDescriptor or StorageKeyPartitionDescriptor.
- Type
- Error
(async) setCookie(cookie, partitionopt) → {PartitionKey}
Sets a cookie using the provided cookie object and partition.
Name | Type | Attributes | Description |
---|---|---|---|
cookie | PartialCookie | The cookie object to set. | |
partition | BrowsingContextPartitionDescriptor | | <optional> | The partition to use for the cookie. |
- Source
If the cookie parameter is not an instance of PartialCookie or if the partition parameter is not an instance of PartitionDescriptor.
- Type
- Error
The partition key of the set cookie.
- Type:
- PartitionKey