AdguardTeam / AdguardTeam/Scriptlets

Improve cookie scriptlets — support 'CookieStore' API

Open
#521 0 comments 3 reactions 1 assignee Claimed by @maximtop View on GitHub
enhancement Priority: P4
Dominant language
JavaScript
Stars
195
Forks
33
PR merge metrics
No merged PRs in 30d

Description

Current description is just a bare MDN link. Needs full expansion:

The following cookie-related scriptlets currently access cookies only via `document.cookie` (synchronous string manipulation):
`set-cookie`, `set-cookie-reload`, `trusted-set-cookie`, `trusted-set-cookie-reload`.

The [CookieStore API](https://developer.mozilla.org/en-US/docs/Web/API/CookieStore) is a newer async alternative that provides cleaner access to cookies without string parsing, and properly handles `SameSite`/`Secure` attributes.

When `CookieStore` is available (currently Chrome/Edge), scriptlets should use it instead of `document.cookie` to set cookies.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.