v145 · Web APIs · Clipboard Monitor
Clipboard Monitor
This page listens for clipboardchange events. Click "Start listening" then copy text anywhere — from the snippets below, from elsewhere on this page, or from another app — and watch the event fire in the monitor below.
Checking
clipboardchange support…copy a snippet to trigger the event
Hello from the clipboard monitor!
clipboardchange fires on every copy — Ctrl+C or programmatic
Chrome 145 ships the clipboardchange event
navigator.clipboard.readText() reads the clipboard value
event monitor
unknown
Events will appear here after you click "Start listening" and copy text…
code
const handler = async () => {
const ts = new Date().toLocaleTimeString();
console.log(`[${ts}] clipboardchange`);
// Reading the value requires clipboard-read permission
const { state } = await navigator.permissions.query({ name: 'clipboard-read' });
if (state === 'granted') {
const text = await navigator.clipboard.readText();
console.log(' text:', text.slice(0, 120));
} else {
console.log(' no clipboard-read — value not available');
}
};
window.addEventListener('clipboardchange', handler);
// window.removeEventListener('clipboardchange', handler);