chrome.cookies.get({url:"http://www.dahotre.com", name:"userid"}, function(){})
returns undefined
when checked in the console.
If I exclude the optional empty function(), it raises an error.
chrome.cookies.get({url:"http://www.dahotre.com", name:"userid"})
triggers Uncaught Error: Parameter 2 is required.
However, using function(Cookie c){}
as the second argument results in a
SyntaxError: Unexpected identifier
The following line deals with the required permissions mentioned in my manifest.json
:
"permissions": [ "cookies", "http://www.dahotre.com/"],
Upon navigating through browser cookies, a cookie associated with www.dahotre.com
can indeed be found with a name of userid and containing an integer value.
What steps should be taken to access this specific cookie within a Chrome extension?