I'm writing extension for Google Chrome. I'm trying to read\write data from clipboard using this method:
chrome.tabs.executeScript( {
code: "document.addEventListener('copy', function(e){ var data=e.clipboardData.getData('text'); alert(data);});"
})
But, it didn't work. If I correctly understood this documentation, above method should work. So, what could be the problem?