OLD | NEW |
| (Empty) |
1 [ | |
2 { | |
3 "namespace": "experimental.sidebar", | |
4 "nodoc": true, | |
5 "types": [], | |
6 "functions": [ | |
7 { | |
8 "name": "hide", | |
9 "type": "function", | |
10 "description": "Hides sidebar's mini tab for the specified tab and colla
pses sidebar if it was in 'active' state (see getState). Has no effect if the si
debar is already hidden.", | |
11 "parameters": [ | |
12 { | |
13 "type": "object", | |
14 "name": "details", | |
15 "optional": true, | |
16 "properties": { | |
17 "tabId": { | |
18 "type": "integer", | |
19 "minimum": 0, | |
20 "optional": true, | |
21 "description": "Defaults to the selected tab of the <a href='win
dows.html#current-window'>current window</a>." | |
22 } | |
23 } | |
24 } | |
25 ] | |
26 }, | |
27 { | |
28 "name": "show", | |
29 "type": "function", | |
30 "description": "Shows sidebar mini tab (in 'shown' state) for the specif
ied tab. Has no effect if already expanded, otherwise changes status to 'shown'.
", | |
31 "parameters": [ | |
32 { | |
33 "type": "object", | |
34 "name": "details", | |
35 "optional": true, | |
36 "properties": { | |
37 "tabId": { | |
38 "type": "integer", | |
39 "minimum": 0, | |
40 "optional": true, | |
41 "description": "Defaults to the selected tab of the <a href='win
dows.html#current-window'>current window</a>." | |
42 } | |
43 } | |
44 } | |
45 ] | |
46 }, | |
47 { | |
48 "name": "expand", | |
49 "type": "function", | |
50 "description": "Expands sidebar and switches to the specified content (i
f it was displaying another extension's sidebar content) for the specified tab.
Extension is allowed to expand sidebar only in response to an explicit user gest
ure.", | |
51 "parameters": [ | |
52 { | |
53 "type": "object", | |
54 "name": "details", | |
55 "optional": true, | |
56 "properties": { | |
57 "tabId": { | |
58 "type": "integer", | |
59 "minimum": 0, | |
60 "optional": true, | |
61 "description": "Defaults to the selected tab of the <a href='win
dows.html#current-window'>current window</a>." | |
62 } | |
63 } | |
64 } | |
65 ] | |
66 }, | |
67 { | |
68 "name": "collapse", | |
69 "type": "function", | |
70 "description": "Collapses sidebar for the specified tab. Has no effect i
f sidebar is not in its 'active' state (see getState).", | |
71 "parameters": [ | |
72 { | |
73 "type": "object", | |
74 "name": "details", | |
75 "optional": true, | |
76 "properties": { | |
77 "tabId": { | |
78 "type": "integer", | |
79 "minimum": 0, | |
80 "optional": true, | |
81 "description": "Defaults to the selected tab of the <a href='win
dows.html#current-window'>current window</a>." | |
82 } | |
83 } | |
84 } | |
85 ] | |
86 }, | |
87 { | |
88 "name": "navigate", | |
89 "type": "function", | |
90 "description": "Loads the the specified html file into the sidebar for t
he specified tab.", | |
91 "parameters": [ | |
92 { | |
93 "type": "object", | |
94 "name": "details", | |
95 "properties": { | |
96 "tabId": { | |
97 "type": "integer", | |
98 "minimum": 0, | |
99 "optional": true, | |
100 "description": "Defaults to the selected tab of the <a href='win
dows.html#current-window'>current window</a>." | |
101 }, | |
102 "path": { | |
103 "type": "string", | |
104 "description": "Relative path to the html file in the extension
to show in the sidebar." | |
105 } | |
106 } | |
107 } | |
108 ] | |
109 }, | |
110 { | |
111 "name": "getState", | |
112 "type": "function", | |
113 "description": "Returns current sidebar state for the specified tab.", | |
114 "parameters": [ | |
115 { | |
116 "type": "object", | |
117 "name": "details", | |
118 "optional": true, | |
119 "properties": { | |
120 "tabId": { | |
121 "type": "integer", | |
122 "minimum": 0, | |
123 "optional": true, | |
124 "description": "Defaults to the selected tab of the <a href='win
dows.html#current-window'>current window</a>." | |
125 } | |
126 } | |
127 }, | |
128 { | |
129 "type": "function", | |
130 "name": "callback", | |
131 "parameters": [ | |
132 { | |
133 "name": "state", | |
134 "type": "string", | |
135 "enum": ["hidden", "shown", "active"], | |
136 "description": "'hidden' indicates sidebar is not defined for th
e specified tab (show was never called or hide() was called). Nothing is display
ed for this sidebar.<br>'shown' means sidebar is defined for the specified tab;
mini tab is displayed for this sidebar. Sidebar UI is either collapsed or displa
ying a content of some other extension's sidebar.<br>'active' indicates that sid
ebar is defined for the specified tab; sidebar UI is expanded and displaying thi
s sidebar's content." | |
137 } | |
138 ] | |
139 } | |
140 ] | |
141 }, | |
142 { | |
143 "name": "setBadgeText", | |
144 "type": "function", | |
145 "description": "Sets sidebar's mini tab badge text for the specified tab
.", | |
146 "parameters": [ | |
147 { | |
148 "type": "object", | |
149 "name": "details", | |
150 "properties": { | |
151 "tabId": { | |
152 "type": "integer", | |
153 "minimum": 0, | |
154 "optional": true, | |
155 "description": "Defaults to the selected tab of the <a href='win
dows.html#current-window'>current window</a>." | |
156 }, | |
157 "text": { | |
158 "type": "string", | |
159 "description": "The sidebar's badge text. The badge is displayed
on top of the sidebar's icon on the mini tab. Any number of characters can be p
assed, but only about four can fit in the space." | |
160 } | |
161 } | |
162 } | |
163 ] | |
164 }, | |
165 { | |
166 "name": "setIcon", | |
167 "type": "function", | |
168 "description": "Sets sidebar's mini tab icon for the specified tab.", | |
169 "parameters": [ | |
170 { | |
171 "type": "object", | |
172 "name": "details", | |
173 "properties": { | |
174 "tabId": { | |
175 "type": "integer", | |
176 "minimum": 0, | |
177 "optional": true, | |
178 "description": "Defaults to the selected tab of the <a href='win
dows.html#current-window'>current window</a>." | |
179 }, | |
180 "imageData": { | |
181 "type": "object", | |
182 "isInstanceOf": "ImageData", | |
183 "properties": {}, | |
184 "additionalProperties": { "type": "any" }, | |
185 "description": "Pixel data for an image to show on the sidebar's
mini tab. Must be an ImageData object (for example, from a <code>canvas</code>
element). Only one of the imagePath/imageData parameters all owed. The extension
's icon is used by default. The preferred size of the icon is 16x16 pixels, any
other size will be scaled to 16x16.", | |
186 "optional": true | |
187 }, | |
188 "path": { | |
189 "type": "string", | |
190 "optional": true, | |
191 "description": "Relative path to an image in the extension to sh
ow on the sidebar's mini tab. Only one of the imagePath/imageData parameters all
owed. The extension's icon is used by default. The preferred size of the icon i
s 16x16 pixels, any other size will be scaled to 16x16." | |
192 } | |
193 } | |
194 } | |
195 ] | |
196 }, | |
197 { | |
198 "name": "setTitle", | |
199 "type": "function", | |
200 "description": "Sets sidebar's mini tab title for the specified tab.", | |
201 "parameters": [ | |
202 { | |
203 "type": "object", | |
204 "name": "details", | |
205 "properties": { | |
206 "tabId": { | |
207 "type": "integer", | |
208 "minimum": 0, | |
209 "optional": true, | |
210 "description": "Defaults to the selected tab of the <a href='win
dows.html#current-window'>current window</a>." | |
211 }, | |
212 "title": { | |
213 "type": "string", | |
214 "description": "The sidebar's title. It is displayed in a toolti
p over the sidebar's mini tab." | |
215 } | |
216 } | |
217 } | |
218 ] | |
219 } | |
220 ], | |
221 "events": [ | |
222 { | |
223 "name": "onStateChanged", | |
224 "type": "function", | |
225 "description": "Notifies about sidebar state changes.", | |
226 "parameters": [ | |
227 { | |
228 "type": "object", | |
229 "name": "details", | |
230 "properties": { | |
231 "tabId": { | |
232 "type": "integer", | |
233 "minimum": 0 | |
234 }, | |
235 "state": { | |
236 "type": "string", | |
237 "enum": ["hidden", "shown", "active"] | |
238 } | |
239 } | |
240 } | |
241 ] | |
242 } | |
243 ] | |
244 } | |
245 ] | |
OLD | NEW |