files/en-us/web/api/extendablecookiechangeevent/deleted/index.md
{{securecontext_header}}{{APIRef("Cookie Store API")}}{{AvailableInWorkers("service")}}
The deleted read-only property of the {{domxref("ExtendableCookieChangeEvent")}} interface returns any cookies that have been deleted by the given ExtendableCookieChangeEvent instance.
An array of objects containing the deleted cookie(s). Each object contains the following properties:
name
value
domain
path
expires
secure
sameSite
SameSite values:
"strict"
"lax"
"none"
partitioned
true) or not (false). See Cookies Having Independent Partitioned State (CHIPS) for more information.In this example when the cookie is deleted the event listener logs the first item in the deleted property to the console. It contains an object representing the cookie that has just been deleted.
self.addEventListener("cookiechange", (event) => {
console.log(event.deleted[0]);
});
{{Specifications}}
{{Compat}}