OLD | NEW |
---|---|
(Empty) | |
1 # Introduction | |
2 | |
3 Lots of extensions want to show infobars for various reasons. Though the infobar s usually follow the pattern of a string of text and a few buttons, they sometim es also want to show richer controls. | |
Bons
2015/08/20 20:16:50
propose to delete
| |
4 | |
5 This proposal is to add an API to chrome to let extensions show infobars backed by HTML. | |
6 | |
7 | |
8 # Details | |
9 | |
10 Since infobars do not take up any persistent space in the UI, they do not need t o be registered in the manifest. | |
11 | |
12 Their programmatic API is very simple: | |
13 | |
14 ``` | |
15 // Shows an infobar in the specified tab. The infobar will be closed automatical ly when the tab | |
16 // navigates. Use window.close() to close the infobar before then. If no |tabId| is specified | |
17 // the infobar will open in the currently selected tab. | |
18 void chrome.experimental.infobars.show({optional int tabId, string htmlPath}, op tional void callback(window)); | |
19 | |
20 ``` | |
21 | |
22 Infobars are scoped to the lifetime of a document, similar to page actions. When the document they are attached to is navigated or closed, they disappear automa tically. | |
23 | |
24 # Display | |
25 | |
26 The HTML rendered inside the infobar should get some default CSS that automatica lly makes the the layout look like a Chrome infobar. | |
27 | |
28 Extension infobars should be limited to a max of 2x the size of current Chrome n ative infobars. | |
29 | |
30 # Open Questions | |
31 | |
32 * What happens when multiple infobars (either extension infobars or native one s) are displayed on the same tab? | |
OLD | NEW |