w3c / webextensions

Charter and administrivia for the WebExtensions Community Group (WECG)
Other
605 stars 56 forks source link

Proposal: add cookies.removeAll() method #690

Open aselya opened 2 months ago

aselya commented 2 months ago

Proposal introducing a new API cookies.removeAll()

aselya commented 2 months ago

Wanted to add some context to why I'm proposing this.

When working on updating the implementation of the cookies API to include the hasCrossSiteAncestor value in the partitionKey, the unit testing I added as part of the change, revealed that my new implementation introduced a bug that caused multiple cookies to be removed with cookies.remove(). I caught the bug and fixed it before it was ever merged into chromium.

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.