强制选项卡进行渲染 [英] Force tab to render

查看:121
本文介绍了强制选项卡进行渲染的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法强制某个标签呈现,即使目前不是活动标签?



我需要这样做的原因是因为我的扩展使用chrome.tabs打开多个选项卡并在它们之间切换,并且每当切换到尚未处于活动状态的选项卡时,选项卡尚未呈现,这会导致选项卡上出现白色闪光,直到选项卡呈现。白色闪光的持续时间也与网页渲染的重量成正比。



但我注意到的是,如果切换到一个制表符在过去至少有一次活动,白色闪光不会出现(因为它已被渲染至少一次)

我需要强制一个标签页在切换到它之前被渲染,以便不出现白色闪光。



我写的是chrome版本38(由于技术限制)



谢谢

解决方案

没有。您无法控制它。

白色闪烁确实令人讨厌已知问题



现在可以实现的唯一一个疯狂的想法:


  1. 使用空白网址或创建新的最小化窗口about:blank

  2. 移动选项卡您需要通过 chrome.tabs.move

  3. 进入该窗口,因为该选项卡处于活动状态,即使在最小化窗口 然后过一段时间将标签移回并激活它


Is there a way to force a certain tab to render, even without currently being the active tab?

The reason i need to do this is because my extension uses chrome.tabs to open multiple tabs and switch between them, and whenever I switch to a tab which has not yet been active, the tab has not rendered yet, which causes a white flash to appear on the tab until the tab renders. The duration of the white flash is also proportional to how heavy the web page is to render.

What I've noticed though, is that if you switch to a tab which was active at least once in the past, the white flash does not appear (since it has been rendered at least once in the past)

I need to force a tab to be rendered before switching to it, so that the white flash doesn't appear.

I am writing on chrome version 38 (due to technical restrictions)

Thanks

解决方案

No. You can't control it.
The white flashing is indeed an annoying known issue.

The only wild idea that can be implemented right now:

  1. create a new minimized window with a blank url or about:blank,
  2. move the tab you need into that window via chrome.tabs.move
  3. now that the tab is active Chrome should render it even in a minimized window
  4. then after a while move the tab back and activate it

这篇关于强制选项卡进行渲染的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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