files/en-us/web/api/clipboardchangeevent/index.md
{{APIRef("Clipboard API")}}{{SeeCompatTable}}
The ClipboardChangeEvent interface of the {{domxref("Clipboard API", "", "", "nocode")}} represents events fired whenever the contents of the system clipboard are changed.
{{InheritanceDiagram}}
ClipboardChangeEvent event with the given parameters.Also inherits properties from its parent {{domxref("Event")}}.
No specific methods; inherits methods from its parent {{domxref("Event")}}.
In this example, when the clipboard's contents are changed, the event listener logs the data types, change id, and the entire event object to the console. This is a ClipboardChangeEvent object of type clipboardchange.
navigator.clipboard.addEventListener("clipboardchange", (event) => {
console.log(`MIME types: ${event.types}`);
console.log(`ID: ${event.changeId}`);
console.dir(event);
});
{{Specifications}}
{{Compat}}