问题
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