OLD | NEW |
1 [ | 1 [ |
2 { | 2 { |
3 "namespace": "extension", | |
4 "types": [ | |
5 { | |
6 "id": "MessageSender", | |
7 "type": "object", | |
8 "description": "An object containing information about the script contex
t that sent a message or request.", | |
9 "properties": { | |
10 "tab": {"$ref": "Tab", "optional": true, "description":"This property
will <b>only</b> be present when the connection was opened from a tab or content
script."}, | |
11 "id": {"type": "string", "description": "The extension ID of the exten
sion that opened the connection."} | |
12 } | |
13 }, | |
14 { | |
15 "id": "Event", | |
16 "type": "object", | |
17 "description": "An object which allows the addition and removal of liste
ners for a Chrome event.", | |
18 "properties": { | |
19 "addListener": {"type": "function"}, | |
20 "removeListener": {"type": "function"}, | |
21 "hasListener": {"type": "function"}, | |
22 "hasListeners": {"type": "function"} | |
23 }, | |
24 "additionalProperties": { "type": "any"} | |
25 }, | |
26 { | |
27 "id": "Port", | |
28 "type": "object", | |
29 "description": "An object which allows two way communication with other
pages.", | |
30 "properties": { | |
31 "name": {"type": "string"}, | |
32 "onDisconnect": { "$ref": "Event" }, | |
33 "onMessage": { "$ref": "Event" }, | |
34 "postMessage": {"type": "function"}, | |
35 "sender": { | |
36 "$ref": "MessageSender", | |
37 "optional": true, | |
38 "description": "This property will <b>only</b> be present on ports p
assed to onConnect/onConnectExternal listeners." | |
39 } | |
40 }, | |
41 "additionalProperties": { "type": "any"} | |
42 } | |
43 ], | |
44 "properties": { | |
45 "lastError": { | |
46 "type": "object", | |
47 "optional": true, | |
48 "unprivileged": true, | |
49 "description": "Set for the lifetime of a callback if an ansychronous ex
tension api has resulted in an error. If no error has occured lastError will be
<var>undefined</var>.", | |
50 "properties": { | |
51 "message": { "type": "string", "description": "Description of the erro
r that has taken place." } | |
52 } | |
53 }, | |
54 "inIncognitoContext": { | |
55 "type": "boolean", | |
56 "optional": true, | |
57 "unprivileged": true, | |
58 "description": "True for content scripts running inside incognito tabs,
and for extension pages running inside an incognito process. The latter only app
lies to extensions with 'split' incognito_behavior." | |
59 } | |
60 }, | |
61 "functions": [ | |
62 { | |
63 "name": "connect", | |
64 "type": "function", | |
65 "unprivileged": true, | |
66 "description": "Attempts to connect to other listeners within the extens
ion (such as the extension's background page). This is primarily useful for cont
ent scripts connecting to their extension processes. Extensions may connect to c
ontent scripts embedded in tabs via <a href='tabs.html#method-connect'><code>chr
ome.tabs.connect()</code></a>.", | |
67 "parameters": [ | |
68 {"type": "string", "name": "extensionId", "optional": true, "descripti
on": "The extension ID of the extension you want to connect to. If omitted, defa
ult is your own extension."}, | |
69 { | |
70 "type": "object", | |
71 "name": "connectInfo", | |
72 "properties": { | |
73 "name": { "type": "string", "optional": true, "description": "Will
be passed into onConnect for extension processes that are listening for the con
nection event." } | |
74 }, | |
75 "optional": true | |
76 } | |
77 ], | |
78 "returns": { | |
79 "$ref": "Port", | |
80 "description": "Port through which messages can be sent and received w
ith the extension. The port's <a href='extension.html#type-Port'>onDisconnect</a
> event is fired if extension does not exist. " | |
81 } | |
82 }, | |
83 { | |
84 "name": "sendRequest", | |
85 "type": "function", | |
86 "unprivileged": true, | |
87 "description": "Sends a single request to other listeners within the ext
ension. Similar to chrome.extension.connect, but only sends a single request wit
h an optional response. The <a href='extension.html#event-onRequest'>chrome.exte
nsion.onRequest</a> event is fired in each page of the extension.", | |
88 "parameters": [ | |
89 {"type": "string", "name": "extensionId", "optional": true, "descripti
on": "The extension ID of the extension you want to connect to. If omitted, defa
ult is your own extension."}, | |
90 { "type": "any", "name": "request" }, | |
91 { | |
92 "type": "function", | |
93 "name": "responseCallback", | |
94 "optional": true, | |
95 "parameters": [ | |
96 { | |
97 "name": "response", | |
98 "type": "any", | |
99 "description": "The JSON response object sent by the handler of
the request. If an error occurs while connecting to the extension, the callback
will be called with no arguments and <a href='extension.html#property-lastError'
>chrome.extension.lastError</a> will be set to the error message." | |
100 } | |
101 ] | |
102 } | |
103 ] | |
104 }, | |
105 { | |
106 "name": "getURL", | |
107 "type": "function", | |
108 "unprivileged": true, | |
109 "description": "Converts a relative path within an extension install dir
ectory to a fully-qualified URL.", | |
110 "parameters": [ | |
111 { | |
112 "type": "string", | |
113 "name": "path", | |
114 "description": "A path to a resource within an extension expressed r
elative to its install directory." | |
115 } | |
116 ], | |
117 "returns": { | |
118 "type": "string", | |
119 "description": "The fully-qualified URL to the resource." | |
120 } | |
121 }, | |
122 { | |
123 "name": "getViews", | |
124 "type": "function", | |
125 "description": "Returns an array of the JavaScript 'window' objects for
each of the pages running inside the current extension.", | |
126 "parameters": [ | |
127 { | |
128 "type": "object", | |
129 "name": "fetchProperties", | |
130 "optional": true, | |
131 "properties": { | |
132 "type": { | |
133 "type": "string", | |
134 "enum": ["tab", "infobar", "notification", "popup"], | |
135 "optional": true, | |
136 "description": "The type of view to get. If omitted, returns all
views (including background pages and tabs). Valid values: 'tab', 'infobar', 'n
otification', 'popup'." | |
137 }, | |
138 "windowId": { | |
139 "type": "integer", | |
140 "optional": true, | |
141 "description": "The window to restrict the search to. If omitted
, returns all views." | |
142 } | |
143 } | |
144 } | |
145 ], | |
146 "returns": { | |
147 "type": "array", | |
148 "description": "Array of global objects", | |
149 "items": { "type": "object", "isInstanceOf": "DOMWindow", "properties"
: {}, "additionalProperties": { "type": "any" } } | |
150 } | |
151 }, | |
152 { | |
153 "name": "getBackgroundPage", | |
154 "type": "function", | |
155 "description": "Returns the JavaScript 'window' object for the backgroun
d page running inside the current extension. Returns null if the extension has n
o background page.", | |
156 "parameters": [], | |
157 "returns": { | |
158 "type": "object", "isInstanceOf": "DOMWindow", "properties": {}, "addi
tionalProperties": { "type": "any" } | |
159 } | |
160 }, | |
161 { | |
162 "name": "getExtensionTabs", | |
163 "nodoc": true, | |
164 "type": "function", | |
165 "description": "Deprecated. Please use getViews({type: 'TAB'}). Returns
an array of the JavaScript 'window' objects for each of the tabs running inside
the current extension. If windowId is specified, returns only the 'window' objec
ts of tabs attached to the specified window.", | |
166 "parameters": [ | |
167 {"type": "integer", "name": "windowId", "optional": true} | |
168 ], | |
169 "returns": { | |
170 "type": "array", | |
171 "description": "Array of global window objects", | |
172 "items": { "type": "object", "isInstanceOf": "DOMWindow", "properties"
: {}, "additionalProperties": { "type": "any" } } | |
173 } | |
174 }, | |
175 { | |
176 "name": "isAllowedIncognitoAccess", | |
177 "type": "function", | |
178 "description": "Retrieves the state of the extension's access to Incogni
to-mode (as determined by the user-controlled 'Allowed in Incognito' checkbox.", | |
179 "min_version": "12.0.706.0", | |
180 "parameters": [ | |
181 { | |
182 "type": "function", | |
183 "name": "callback", | |
184 "parameters": [ | |
185 { | |
186 "name": "isAllowedAccess", | |
187 "type": "boolean", | |
188 "description": "True if the extension has access to Incognito mo
de, false otherwise." | |
189 } | |
190 ] | |
191 } | |
192 ] | |
193 }, | |
194 { | |
195 "name": "isAllowedFileSchemeAccess", | |
196 "type": "function", | |
197 "description": "Retrieves the state of the extension's access to the 'fi
le://' scheme (as determined by the user-controlled 'Allow access to File URLs'
checkbox.", | |
198 "min_version": "12.0.706.0", | |
199 "parameters": [ | |
200 { | |
201 "type": "function", | |
202 "name": "callback", | |
203 "parameters": [ | |
204 { | |
205 "name": "isAllowedAccess", | |
206 "type": "boolean", | |
207 "description": "True if the extension can access the 'file://' s
cheme, false otherwise." | |
208 } | |
209 ] | |
210 } | |
211 ] | |
212 }, | |
213 { | |
214 "name": "setUpdateUrlData", | |
215 "type": "function", | |
216 "description": "Sets the value of the ap CGI parameter used in the exten
sion's update URL. This value is ignored for extensions that are hosted in the
Chrome Extension Gallery.", | |
217 "parameters": [ | |
218 {"type": "string", "name": "data", "maxLength": 1024} | |
219 ] | |
220 } | |
221 ], | |
222 "events": [ | |
223 { | |
224 "name": "onConnect", | |
225 "type": "function", | |
226 "unprivileged": true, | |
227 "description": "Fired when a connection is made from either an extension
process or a content script.", | |
228 "parameters": [ | |
229 {"$ref": "Port", "name": "port"} | |
230 ] | |
231 }, | |
232 { | |
233 "name": "onConnectExternal", | |
234 "type": "function", | |
235 "description": "Fired when a connection is made from another extension."
, | |
236 "parameters": [ | |
237 {"$ref": "Port", "name": "port"} | |
238 ] | |
239 }, | |
240 { | |
241 "name": "onRequest", | |
242 "type": "function", | |
243 "unprivileged": true, | |
244 "description": "Fired when a request is sent from either an extension pr
ocess or a content script.", | |
245 "parameters": [ | |
246 {"name": "request", "type": "any", "description": "The request sent by
the calling script."}, | |
247 {"name": "sender", "$ref": "MessageSender" }, | |
248 {"name": "sendResponse", "type": "function", "description": "Function
to call (at most once) when you have a response. The argument should be any JSON
-ifiable object, or undefined if there is no response. If you have more than one
<code>onRequest</code> listener in the same document, then only one may send a
response." } | |
249 ] | |
250 }, | |
251 { | |
252 "name": "onRequestExternal", | |
253 "type": "function", | |
254 "description": "Fired when a request is sent from another extension.", | |
255 "parameters": [ | |
256 {"name": "request", "type": "any", "description": "The request sent by
the calling script."}, | |
257 {"name": "sender", "$ref": "MessageSender" }, | |
258 {"name": "sendResponse", "type": "function", "description": "Function
to call when you have a response. The argument should be any JSON-ifiable object
, or undefined if there is no response." } | |
259 ] | |
260 } | |
261 ] | |
262 }, | |
263 { | |
264 "namespace": "experimental.accessibility", | 3 "namespace": "experimental.accessibility", |
265 "nodoc": true, | 4 "nodoc": true, |
266 "types": [ | 5 "types": [ |
267 { | 6 { |
268 "id": "AccessibilityObject", | 7 "id": "AccessibilityObject", |
269 "type": "object", | 8 "type": "object", |
270 "description": "Parent class for accessibility information about an obje
ct.", | 9 "description": "Parent class for accessibility information about an obje
ct.", |
271 "properties": { | 10 "properties": { |
272 "type": { | 11 "type": { |
273 "type": "string", | 12 "type": "string", |
(...skipping 9115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9389 "enum": ["enabled", "disabled", "forced"], | 9128 "enum": ["enabled", "disabled", "forced"], |
9390 "description": "Exposes whether the incognito mode is available
to windows. One of 'enabled', 'disabled' (user cannot browse pages in Incognito
mode), 'forced' (all pages/sessions are forced into Incognito mode)." | 9129 "description": "Exposes whether the incognito mode is available
to windows. One of 'enabled', 'disabled' (user cannot browse pages in Incognito
mode), 'forced' (all pages/sessions are forced into Incognito mode)." |
9391 } | 9130 } |
9392 ] | 9131 ] |
9393 } | 9132 } |
9394 ] | 9133 ] |
9395 } | 9134 } |
9396 ] | 9135 ] |
9397 } | 9136 } |
9398 ] | 9137 ] |
OLD | NEW |