javascript – 如何让Chrome扩展程序的窗口在任务栏中闪烁?

我注意到有一些应用程序可以使任务栏中的窗口使用chrome扩展名闪烁?与下载内容时chrome将显示绿色进度条的方式类似,其他窗口将闪烁橙色以引起您的注意.反正有没有Chrome扩展来做到这一点? 最佳答案 是的,有可能使用
windows API

drawAttention

If true, causes the window to be displayed in a manner that draws the user’s attention to the window, without changing the focused window. The effect lasts until the user changes focus to the window. This option has no effect if the window already has focus. Set to false to cancel a previous draw attention request.

// You can pass -2 as windowId for the current window,
//  or query tabs/windows to get the one you want
chrome.windows.update(windowId, {drawAttention: true});
点赞