Access Chrome clipboard events with extension

被刻印的时光 ゝ 提交于 2021-01-28 06:12:03

问题


I want to copy the system clipboard data in my extension; I am able to get the events for copy, cut and paste of my extension, bt I want to get the event when ever system clipboard changes.

How can I do this?


回答1:


In general, you cannot. There is no event that indicates that SOMEWHERE in the system the clipboard was updated.

An imperfect solution would be to inject content scripts in all pages and listen to events in them. This will only work for copy/cut of the content of the pages themselves.



来源:https://stackoverflow.com/questions/28964764/access-chrome-clipboard-events-with-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!