Documentation: Chrome Cookies API
A promise-based wrapper for the Chrome cookies API.
- getCookie(details)
- getAllCookie(details)
- getAllCookieStores()
- getCookiePartitionKey(details)
- removeCookie(details)
- setCookie(details)
getCookie(details: chrome.cookies.CookieDetails): Promise<chrome.cookies.Cookie | null>
Retrieves the cookie matching the specified details, or null if not found.
getAllCookie(details?: chrome.cookies.GetAllDetails): Promise<chrome.cookies.Cookie[]>
Retrieves all cookies that match the given filter details.
getAllCookieStores(): Promise<chrome.cookies.CookieStore[]>
Retrieves all cookie stores accessible to the extension.
getCookiePartitionKey(details: chrome.cookies.FrameDetails): Promise<chrome.cookies.CookiePartitionKey>
Retrieves the partition key for the cookie associated with the given frame (Manifest V3 only).
removeCookie(details: chrome.cookies.CookieDetails): Promise<chrome.cookies.CookieDetails>
Removes the cookie matching the specified details, returning the details of the removed cookie.
setCookie(details: chrome.cookies.SetDetails): Promise<chrome.cookies.Cookie | null>
Sets a cookie with the given details, returning the created cookie or null on failure.
onCookieChanged(callback: (changeInfo: chrome.cookies.CookieChangeInfo) => void): () => void
Adds a listener that triggers when a cookie change event occurs.