How to build an chrome extension like Google Hango

2019-01-13 09:18发布

问题:

The Google Hangouts extension has a panel that shows up outside of the Chrome UI.

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?

回答1:

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 may not be supported on all platforms and you may have to specifically enable panels in Chrome Flags chrome://flags/#enable-panels.