After copying the letter A, I noticed that an empty string is being logged to the console instead of the expected A.
However, when I paste, the console does successfully log the letter A.
document.addEventListener('copy', handler);
document.addEventListener('cut', handler);
document.addEventListener('paste', handler);
function handler(e) {
console.log(e.clipboardData.getData('text/plain'));
}
A