Conversation
Initial draft
oliverdunk
left a comment
There was a problem hiding this comment.
This generally looks good, thanks! I left a couple of comments.
|
Wanted to add some context to why I'm proposing this. When working on updating the implementation of the cookies API to include the Despite the behavior being a bug, I found the ability to delete multiple cookies with the same call to be quite useful and thought it made sense to add it to the cookies api. |
Updating parameters to explicitly reference cookies.remove Co-authored-by: Rob Wu <rob@robwu.nl>
Add more related issues Update the motivation language to reflect the related issues.
Add link to bug in the motivation
Update the objective to be more explicit about the pain point for developers.
Update language in objective.
Update language to make `{}` and error
Update case: `partitionKey : {}` to match `cookies.getAll`
Update requirements of details object.
Added more detailed description of host permissions impact on API call
Made update to remove the `top-level site` as an optional stand alone parameter.
oliverdunk
left a comment
There was a problem hiding this comment.
This looks good to me! Adding @rdcronin to make sure he is happy before we land.
Rob--W
left a comment
There was a problem hiding this comment.
Some examples with non-trivial cases would be nice, but
|
|
||
| ##### Return | ||
|
|
||
| > `Promise<Cookie[]>`: |
There was a problem hiding this comment.
/cc @Rob--W since I know he normally has thoughts on performance-related aspects.
The existing remove() method doesn't return a full cookie, but rather a subset of its properties: name, partitionKey, storeId, and url. I'm curious if we should perhaps lean on that instead, which avoids serializing quite as much data -- in particular, it avoids passing all the values to the extension (which may be quite large in practice).
WDYT?
(If we go that route, we could introduce a common type for it -- CookieSummary, CookieMetadata, or similar?)
Co-authored-by: Rob Wu <rob@robwu.nl>
Update to add reference to `cookies.getAll` as the matching behavior primitive.
Update language to - A details object must contain at least a `url` a `partitionKey` with a valid `topLevelSite`.
Proposal introducing a new API cookies.removeAll()