chrome.cookies.get() Invalid value for argument 0. Property 'name'
I'm writing a jquery extension where I'm doing something like:
var c = chrome.cookies.get({url:"some-web-site"});
in my popup.html file.
When I tryt to run the extension it gives the following error:
Uncaught Error: Invalid value for argument 0. Property 'name': Property is required.
and gives jqury.min开发者_StackOverflow.js:16 as the location (I am including jquery from a google CDN).
As soon as I comment out the above code, the extension runs fine.
Any ideas?
You need to specify both url and name of the cookie.
var c = chrome.cookies.get({url:"some-web-site", name: "cookie-name"});
精彩评论