function logStores(cookieStores) {
for (const store of cookieStores) {
console.log(`Cookie store: ${store.id}\n Tab IDs: ${store.tabIds}`);
}
}
browser.cookies.getAllCookieStores().then(logStores);cookies.CookieStore / notebook
cookies.CookieStore
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
browser.cookies.getAllCookieStores().then((stores) => {
const incognitoStores = stores.map((store) => store.incognito);
console.log(
`Of ${stores.length} cookie stores, ${incognitoStores.length} are incognito.`,
);
});