I am developing a browser extension using wxt.dev and there i want to get cookies.
tried using google cookie APis but getting undefined
function getCookies(domain: any, name: any, callback: any) {
chrome.cookie.get({ url: domain, name: name }, function (cookie: any) {
if (callback) {
callback(cookie.value);
}
});
}
getCookies("https://www.linkedin.com/", "id", function (id: any) {
alert(id);
});
New contributor
DIvy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.