我有一个打包的Chrome应用程序,为此我设置 Headers 栏颜色如下:
chrome.app.window.create("index.html", {
"id": "app",
"bounds": {
width: width,
height: height
},
"frame": {color: "#F44336"},
});
上面的代码工作正常,因为它创建了具有所需颜色的应用程序窗口 . 现在我想通过脚本更改颜色,因为我的应用程序具有不同的主题,我需要更改 Headers 栏颜色以匹配所选主题 .
加载窗口后有没有办法更改 Headers 栏颜色?
1 回答
Interestingly, the answer is "no".
创建后可以使用窗口执行的所有操作都可以通过
create
返回的AppWindow
对象访问;或者,您可以使用chrome.app.window.current()
获取对当前AppWindow
的引用 .但是,looking at the documentation,对象中没有与窗口框架相关的任何内容 .
查看实际对象,有未记录的属性
hasFrameColor
,activeFrameColor
和inactiveFrameColor
,但这些只是getter,你不能设置它们 .这可能是一个不错的feature request,似乎没有现有的 .