A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/CookieStore/change_event below:

CookieStore: change event - Web APIs

CookieStore: change event

Baseline 2025

Newly available

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

A change event is fired at a CookieStore object when a change is made to any cookie.

Syntax

Use the event name in methods like addEventListener(), or set an event handler property.

addEventListener("change", (event) => { })

onchange = (event) => { }
Event type Examples

To be informed when a cookie has changed, you can add a handler to the cookieStore instance using addEventListener(), like this:

cookieStore.addEventListener("change", (event) => {
  console.log("1 change event");
});

Alternatively, you can use the onchange event handler property to establish a handler for the change event:

cookieStore.onchange = (event) => {
  console.log("1 change event");
};
Specifications Browser compatibility

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4