如何构建像 Google Hangouts 这样的 chrome 扩展程序 [英] How to build an chrome extension like Google Hangouts
问题描述
Google Hangouts 扩展程序 有一个显示在 Chrome 用户界面之外的面板.
The Google Hangouts extension has a panel that shows up outside of the Chrome UI.
这有点像通知,但不是.我在扩展开发人员文档中没有看到任何描述 API 来完成这项工作的内容.这是他们正在做的特定于 Google 的黑客攻击吗?实验性 API 中是否有我遗漏的内容?
It is sort of like a notification but not. I don't see anything in the Extension Developer Docs that describes an API to make this work. Is this a Google-specific hack they're doing? Is there something in the experimental APIs that I'm missing?
推荐答案
是chrome.windows.create.确保将 type
设置为 panel
.
It is an options of chrome.windows.create. Make sure you set type
to panel
.
chrome.windows.create({ url: 'https://mobile.twitter.com/', type: 'panel' });
panel
可能并非在所有平台上都受支持,您可能必须在 Chrome 标志 chrome://flags/#enable-panels
中专门启用面板.
panel
may not be supported on all platforms and you may have to specifically enable panels in Chrome Flags chrome://flags/#enable-panels
.
这篇关于如何构建像 Google Hangouts 这样的 chrome 扩展程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!