adding onChange example code

This commit is contained in:
chrisdavidmills
2016-08-01 12:40:44 +01:00
parent 8285298a5d
commit a88ad30cdf
2 changed files with 9 additions and 2 deletions

View File

@@ -59,4 +59,10 @@ reset.onclick = function() {
name: "bgpicker"
})
});
}
}
/* Report cookie changes to the console */
chrome.cookies.onChanged.addListener(function(changeInfo) {
console.log('Cookie changed:\n* Cookie: ' + JSON.stringify(changeInfo.cookie) + '\n* Cause: ' + changeInfo.cause + '\n* Removed: ' + changeInfo.removed)
})

View File

@@ -157,7 +157,8 @@
"Cookie",
"get",
"set",
"remove"
"remove",
"onChanged"
]
},
{