Skip to content

Latest commit

 

History

History
88 lines (54 loc) · 2.02 KB

File metadata and controls

88 lines (54 loc) · 2.02 KB

cookies

Documentation: Chrome Cookies API

A promise-based wrapper for the Chrome cookies API.

Methods

Events

getCookie

getCookie(details: chrome.cookies.CookieDetails): Promise<chrome.cookies.Cookie | null>

Retrieves the cookie matching the specified details, or null if not found.

getAllCookie

getAllCookie(details?: chrome.cookies.GetAllDetails): Promise<chrome.cookies.Cookie[]>

Retrieves all cookies that match the given filter details.

getAllCookieStores

getAllCookieStores(): Promise<chrome.cookies.CookieStore[]>

Retrieves all cookie stores accessible to the extension.

getCookiePartitionKey [MV3]

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

removeCookie(details: chrome.cookies.CookieDetails): Promise<chrome.cookies.CookieDetails>

Removes the cookie matching the specified details, returning the details of the removed cookie.

setCookie

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

onCookieChanged(callback: (changeInfo: chrome.cookies.CookieChangeInfo) => void): () => void

Adds a listener that triggers when a cookie change event occurs.