web api instance property
ClipboardChangeEvent: types property
Secure contextLimited availability
The types read-only property of the ClipboardChangeEvent interface returns an array of strings representing the mandatory MIME types available on the system clipboard when the ClipboardChangeEvent event was fired. Optional types and custom formats are not included to limit fingerprinting.
Value
An array of strings.
Examples
In this example, when the contents of the clipboard change, the event listener logs to the console every string representing a mime type that is available in the array returned by the ClipboardChangeEvent.types property.
navigator.clipboard.addEventListener("clipboardchange", (event) => {
event.types.forEach((value) => {
console.log(value);
});
});
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.