I write extensions for Google Chrome. I try to write / read the contents of the buffer. I do it like this:
chrome.tabs.executeScript( { code: "document.addEventListener('copy', function(e){ var data=e.clipboardData.getData('text'); alert(data);});" }) This method does not work. Perhaps there is a mistake somewhere? I also came across this API https://developer.chrome.com/apps/clipboard . Perhaps now buffer events can only be caught using it? The example from here https://www.w3.org/TR/clipboard-apis/#the-copy-action says that my method should work. What is the problem, I do not understand.