Reputation: 366
I'm trying to use the google chrome cookies extension when developing a chrome extension app. I've followed the instructions found here: http://code.google.com/chrome/extensions/cookies.html
My manifest file already has the permissions and cookies.
The problem is now I can't seem to call any of the methods in the cookies extension
var newCookie = {'url:': 'http://*/*', 'name': 'routeCookie', 'value': route.tag[document.boxForm.routeBox.options.selectedIndex]};
chrome.cookies.set(newCookie);
Error: UnCaught TypeError: Cannot call method 'set' of undefined
Upvotes: 2
Views: 3088
Reputation: 111285
I bet you are trying to run it from a content script. Most API methods are available only in background pages.
Upvotes: 8