Chrome extension cookies

# permissions

set the cookies permission and the domain you would like to access cookies.

“permissions”: {

# type
## cookie
just a simple object with `{name, value, domain…}`

## CookieStore
normal mode and incognito mode use different cookie stores.
# read

get: `chrome.cookies.get({url: URL, name: COOKIE_NAME, storeId: COOKIE_STORE_ID}, function(cookie) {})`

get all: `chrome.cookies.get({domain: DOMAIN}, function(cookies) {})` NOTE: there are other filters not listed here.

set: `chrome.cookies.set({url, name, value}, function(cookie) {})` if failed, the callback gets null

About 逸飞



电子邮件地址不会被公开。 必填项已用*标注