OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 [ | |
6 { | |
7 "namespace": "experimental.runtime", | |
8 "functions": [ | |
9 { | |
10 "name": "getBackgroundPage", | |
11 "type": "function", | |
12 "description": "Retrieves the JavaScript 'window' object for the backgro
und page running inside the current extension. If the background page is transie
nt, the system will ensure it is loaded before calling the callback. If there is
no background page, an error is set.", | |
13 "parameters": [ | |
14 { | |
15 "type": "function", | |
16 "name": "callback", | |
17 "parameters": [ | |
18 { | |
19 "name": "backgroundPage", | |
20 // Note: Only optional because we don't support validation | |
21 // for custom callbacks. | |
22 "optional": true, | |
23 "type": "object", | |
24 "isInstanceOf": "global", | |
25 "additionalProperties": { "type": "any" }, | |
26 "description": "The JavaScript 'window' object for the backgroun
d page." | |
27 } | |
28 ] | |
29 } | |
30 ] | |
31 } | |
32 ], | |
33 "events": [ | |
34 { | |
35 "name": "onInstalled", | |
36 "type": "function", | |
37 "description": "Fired when the extension is first installed." | |
38 }, | |
39 { | |
40 "name": "onBackgroundPageUnloadingSoon", | |
41 "type": "function", | |
42 "description": "Sent to the transient background page just before it is
unloaded. This gives the extension opportunity to do some clean up. Note that si
nce the page is unloading, any asynchronous operations started while handling th
is event are not guaranteed to complete." | |
43 } | |
44 ] | |
45 } | |
46 ] | |
OLD | NEW |