captureVisibleTab的不可见标签 [英] captureVisibleTab of non-visible tab

查看:178
本文介绍了captureVisibleTab的不可见标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用Chrome扩展API截取不可见标签?

chrome.tabs.captureVisibleTab

我可以以编程方式切换到所需的选项卡,截取屏幕并切换回来,但因为它们都是异步的,在这种情况下会出现闪烁现象。 解决方案

将页面复制到新窗口并将窗口移出屏幕,然后截取屏幕截图。然后用户不会注意到你已经打开了一个新窗口,因为它在屏幕之外。



希望这可以帮助你。


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.

解决方案

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.

这篇关于captureVisibleTab的不可见标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆