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": "webNavigation", | |
8 "types": [], | |
9 "functions": [ | |
10 { | |
11 "name": "getFrame", | |
12 "type": "function", | |
13 "description": "Retrieves information about the given frame. A frame ref
ers to an <iframe> or a <frame> of a web page and is identified by a
tab ID and a frame ID.", | |
14 "parameters": [ | |
15 { | |
16 "type": "object", | |
17 "name": "details", | |
18 "description": "Information about the frame to retrieve information
about.", | |
19 "properties": { | |
20 "tabId": { "type": "integer", "minimum": 0, "description": "The ID
of the tab in which the frame is." }, | |
21 "frameId": { "type": "integer", "minimum": 0, "description": "The
ID of the frame in the given tab." } | |
22 } | |
23 }, | |
24 { | |
25 "type": "function", "name": "callback", "parameters": [ | |
26 { | |
27 "type": "object", | |
28 "name": "details", | |
29 "optional": true, | |
30 "description": "Information about the requested frame, null if t
he specified frame ID and/or tab ID are invalid.", | |
31 "properties": { | |
32 "errorOccurred": { | |
33 "type": "boolean", | |
34 "description": "True if the last navigation in this frame wa
s interrupted by an error, i.e. the onErrorOccurred event fired." | |
35 }, | |
36 "url": { | |
37 "type": "string", | |
38 "description": "The URL currently associated with this frame
, if the frame identified by the frameId existed at one point in the given tab.
The fact that an URL is associated with a given frameId does not imply that the
corresponding frame still exists." | |
39 } | |
40 } | |
41 } | |
42 ] | |
43 } | |
44 ] | |
45 }, | |
46 { | |
47 "name": "getAllFrames", | |
48 "type": "function", | |
49 "description": "Retrieves information about all frames of a given tab.", | |
50 "parameters": [ | |
51 { | |
52 "type": "object", | |
53 "name": "details", | |
54 "description": "Information about the tab to retrieve all frames fro
m.", | |
55 "properties": { | |
56 "tabId": { "type": "integer", "minimum": 0, "description": "The ID
of the tab." } | |
57 } | |
58 }, | |
59 { | |
60 "type": "function", "name": "callback", "parameters": [ | |
61 { | |
62 "name": "details", | |
63 "type": "array", | |
64 "description": "A list of frames in the given tab, null if the s
pecified tab ID is invalid.", | |
65 "optional": true, | |
66 "items": { | |
67 "type": "object", | |
68 "properties": { | |
69 "errorOccurred": { | |
70 "type": "boolean", | |
71 "description": "True if the last navigation in this frame
was interrupted by an error, i.e. the onErrorOccurred event fired." | |
72 }, | |
73 "frameId": { | |
74 "type": "integer", | |
75 "description": "The ID of the frame. 0 indicates that this
is the main frame; a positive value indicates the ID of a subframe." | |
76 }, | |
77 "url": { | |
78 "type": "string", | |
79 "description": "The URL currently associated with this fra
me, if the frame identified by the frameId existed at one point in the given tab
. The fact that an URL is associated with a given frameId does not imply that th
e corresponding frame still exists." | |
80 } | |
81 } | |
82 } | |
83 } | |
84 ] | |
85 } | |
86 ] | |
87 } | |
88 ], | |
89 "events": [ | |
90 { | |
91 "name": "onBeforeNavigate", | |
92 "type": "function", | |
93 "description": "Fired when a navigation is about to occur.", | |
94 "parameters": [ | |
95 { | |
96 "type": "object", | |
97 "name": "details", | |
98 "properties": { | |
99 "tabId": {"type": "integer", "description": "The ID of the tab in
which the navigation is about to occur."}, | |
100 "url": {"type": "string"}, | |
101 "frameId": {"type": "integer", "description": "0 indicates the nav
igation happens in the tab content window; a positive value indicates navigation
in a subframe. Frame IDs are unique within a tab."}, | |
102 "timeStamp": {"type": "number", "description": "The time when the
browser was about to start the navigation, in milliseconds since the epoch."} | |
103 } | |
104 } | |
105 ] | |
106 }, | |
107 { | |
108 "name": "onCommitted", | |
109 "type": "function", | |
110 "description": "Fired when a navigation is committed. The document (and
the resources it refers to, such as images and subframes) might still be downloa
ding, but at least part of the document has been received from the server and th
e browser has decided to switch to the new document.", | |
111 "parameters": [ | |
112 { | |
113 "type": "object", | |
114 "name": "details", | |
115 "properties": { | |
116 "tabId": {"type": "integer", "description": "The ID of the tab in
which the navigation occurs."}, | |
117 "url": {"type": "string"}, | |
118 "frameId": {"type": "integer", "description": "0 indicates the nav
igation happens in the tab content window; a positive value indicates navigation
in a subframe. Frame IDs are unique within a tab."}, | |
119 "transitionType": {"type": "string", "enum": ["link", "typed", "au
to_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "fo
rm_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of
the navigation. The same transition types as defined in the history API are used
."}, | |
120 "transitionQualifiers": {"type": "array", "description": "A list o
f transition qualifiers.", "items": {"type": "string", "enum": ["client_redirect
", "server_redirect", "forward_back", "from_address_bar"]}}, | |
121 "timeStamp": {"type": "number", "description": "The time when the
navigation was committed, in milliseconds since the epoch."} | |
122 } | |
123 } | |
124 ] | |
125 }, | |
126 { | |
127 "name": "onDOMContentLoaded", | |
128 "type": "function", | |
129 "description": "Fired when the page's DOM is fully constructed, but the
referenced resources may not finish loading.", | |
130 "parameters": [ | |
131 { | |
132 "type": "object", | |
133 "name": "details", | |
134 "properties": { | |
135 "tabId": {"type": "integer", "description": "The ID of the tab in
which the navigation occurs."}, | |
136 "url": {"type": "string"}, | |
137 "frameId": {"type": "integer", "description": "0 indicates the nav
igation happens in the tab content window; a positive value indicates navigation
in a subframe. Frame IDs are unique within a tab."}, | |
138 "timeStamp": {"type": "number", "description": "The time when the
page's DOM was fully constructed, in milliseconds since the epoch."} | |
139 } | |
140 } | |
141 ] | |
142 }, | |
143 { | |
144 "name": "onCompleted", | |
145 "type": "function", | |
146 "description": "Fired when a document, including the resources it refers
to, is completely loaded and initialized.", | |
147 "parameters": [ | |
148 { | |
149 "type": "object", | |
150 "name": "details", | |
151 "properties": { | |
152 "tabId": {"type": "integer", "description": "The ID of the tab in
which the navigation occurs."}, | |
153 "url": {"type": "string"}, | |
154 "frameId": {"type": "integer", "description": "0 indicates the nav
igation happens in the tab content window; a positive value indicates navigation
in a subframe. Frame IDs are unique within a tab."}, | |
155 "timeStamp": {"type": "number", "description": "The time when the
document finished loading, in milliseconds since the epoch."} | |
156 } | |
157 } | |
158 ] | |
159 }, | |
160 { | |
161 "name": "onErrorOccurred", | |
162 "type": "function", | |
163 "description": "Fired when an error occurs and the navigation is aborted
. This can happen if either a network error occurred, or the user aborted the na
vigation.", | |
164 "parameters": [ | |
165 { | |
166 "type": "object", | |
167 "name": "details", | |
168 "properties": { | |
169 "tabId": {"type": "integer", "description": "The ID of the tab in
which the navigation occurs."}, | |
170 "url": {"type": "string"}, | |
171 "frameId": {"type": "integer", "description": "0 indicates the nav
igation happens in the tab content window; a positive value indicates navigation
in a subframe. Frame IDs are unique within a tab."}, | |
172 "error": {"type": "string", "description": "The error description.
"}, | |
173 "timeStamp": {"type": "number", "description": "The time when the
error occurred, in milliseconds since the epoch."} | |
174 } | |
175 } | |
176 ] | |
177 }, | |
178 { | |
179 "name": "onCreatedNavigationTarget", | |
180 "type": "function", | |
181 "description": "Fired when a new window, or a new tab in an existing win
dow, is created to host a navigation.", | |
182 "parameters": [ | |
183 { | |
184 "type": "object", | |
185 "name": "details", | |
186 "properties": { | |
187 "sourceTabId": {"type": "integer", "description": "The ID of the t
ab in which the navigation is triggered."}, | |
188 "sourceFrameId": {"type": "integer", "description": "The ID of the
frame with sourceTabId in which the navigation is triggered. 0 indicates the ma
in frame."}, | |
189 "url": {"type": "string", "description": "The URL to be opened in
the new window."}, | |
190 "tabId": {"type": "integer", "description": "The ID of the tab in
which the url is opened"}, | |
191 "timeStamp": {"type": "number", "description": "The time when the
browser was about to create a new view, in milliseconds since the epoch."} | |
192 } | |
193 } | |
194 ] | |
195 }, | |
196 { | |
197 "name": "onReferenceFragmentUpdated", | |
198 "type": "function", | |
199 "description": "Fired when the reference fragment of a frame was updated
. All future events for that frame will use the updated URL.", | |
200 "parameters": [ | |
201 { | |
202 "type": "object", | |
203 "name": "details", | |
204 "properties": { | |
205 "tabId": {"type": "integer", "description": "The ID of the tab in
which the navigation occurs."}, | |
206 "url": {"type": "string"}, | |
207 "frameId": {"type": "integer", "description": "0 indicates the nav
igation happens in the tab content window; a positive value indicates navigation
in a subframe. Frame IDs are unique within a tab."}, | |
208 "transitionType": {"type": "string", "enum": ["link", "typed", "au
to_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "fo
rm_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of
the navigation. The same transition types as defined in the history API are used
."}, | |
209 "transitionQualifiers": {"type": "array", "description": "A list o
f transition qualifiers.", "items": {"type": "string", "enum": ["client_redirect
", "server_redirect", "forward_back", "from_address_bar"]}}, | |
210 "timeStamp": {"type": "number", "description": "The time when the
navigation was committed, in milliseconds since the epoch."} | |
211 } | |
212 } | |
213 ] | |
214 } | |
215 ] | |
216 } | |
217 ] | |
OLD | NEW |