captureVisibleTab of non-visible tab

主宰稳场 提交于 2019-12-24 01:16:44

问题


Is it possible to take a screenshot of non-visible tab with chrome extension API?

chrome.tabs.captureVisibleTab takes only the selected tab on a specific window.

I could programmatically switch to the needed tab, take a screenshot and switch back, but since it's all async, there's a flicker while it happens.


回答1:


Copy the page to a new window and move the window outside the screen then take a screenshot. Then the user will not notice that you have opened a new window because it is outside the screen.

Hope this helps you out.



来源:https://stackoverflow.com/questions/6803283/capturevisibletab-of-non-visible-tab

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