OLD | NEW |
1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: | 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: |
2 1) The <head> information in this page is significant, should be uniform | 2 1) The <head> information in this page is significant, should be uniform |
3 across api docs and should be edited only with knowledge of the | 3 across api docs and should be edited only with knowledge of the |
4 templating mechanism. | 4 templating mechanism. |
5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a | 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a |
6 browser, it will be re-generated from the template, json schema and | 6 browser, it will be re-generated from the template, json schema and |
7 authored overview content. | 7 authored overview content. |
8 4) The <body>.innerHTML is also generated by an offline step so that this | 8 4) The <body>.innerHTML is also generated by an offline step so that this |
9 page may easily be indexed by search engines. | 9 page may easily be indexed by search engines. |
10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> | 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 <a name="H2-0"></a><h2>Notes</h2> | 339 <a name="H2-0"></a><h2>Notes</h2> |
340 <p> | 340 <p> |
341 The <a href="#property-tabId"><code>tabId</code></a> property | 341 The <a href="#property-tabId"><code>tabId</code></a> property |
342 provides tab identifier that may be used with the <a href="tabs.html"> | 342 provides tab identifier that may be used with the <a href="tabs.html"> |
343 <code>chrome.tabs.*</code></a> API calls. | 343 <code>chrome.tabs.*</code></a> API calls. |
344 However, please note that <code>chrome.tabs.*</code> API is not | 344 However, please note that <code>chrome.tabs.*</code> API is not |
345 exposed to the Developer Tools extension pages due to security considerations | 345 exposed to the Developer Tools extension pages due to security considerations |
346 — you will need to pass the tab ID to the background page and invoke | 346 — you will need to pass the tab ID to the background page and invoke |
347 the <code>chrome.tabs.*</code> API functions from there. | 347 the <code>chrome.tabs.*</code> API functions from there. |
348 </p><p></p> | 348 </p><p></p> |
349 The <code>eval()</code> provides the ability for extensions to execute | 349 The <code>eval()</code> method provides the ability for extensions to execute |
350 JavaScript code in the context of the main frame of the inspected page. | 350 JavaScript code in the context of the main frame of the inspected page. |
351 This function is different from | 351 This method is different from |
352 <code>chrome.tabs.executeScript()</code> in the following aspects: | 352 <code>chrome.tabs.executeScript()</code> in the following aspects: |
353 <p></p><ul> | 353 <p></p><ul> |
354 <li>The <code>eval()</code> does not | 354 <li>The <code>eval()</code> method does not |
355 use an isolated world for the code being evaluated, so the JavaScript state | 355 use an isolated world for the code being evaluated, so the JavaScript state |
356 of the inspected window is accessible to the code. | 356 of the inspected window is accessible to the code. |
357 </li><li> | 357 </li><li> |
358 The evaluated code may return a value that is passed to the extension callback. | 358 The evaluated code may return a value that is passed to the extension callback. |
359 The returned value has to be a valid JSON object (i.e. may contain only | 359 The returned value has to be a valid JSON object (i.e. may contain only |
360 primitive JavaScript types and acyclic references to other JSON | 360 primitive JavaScript types and acyclic references to other JSON |
361 objects). | 361 objects). |
362 | 362 |
363 <em>Please observe extra care while processing the data received from the | 363 <em>Please observe extra care while processing the data received from the |
364 inspected page — the execution context is essentially controlled by the | 364 inspected page — the execution context is essentially controlled by the |
365 inspected page; a malicious page may affect the data being returned to the | 365 inspected page; a malicious page may affect the data being returned to the |
366 extension.</em> | 366 extension.</em> |
367 </li><li> | 367 </li><li> |
368 The execution context of the code being evaluated includes the | 368 The execution context of the code being evaluated includes the |
369 <a href="http://code.google.com/chrome/devtools/docs/console.html">Developer | 369 <a href="http://code.google.com/chrome/devtools/docs/console.html">Developer |
370 Tools console API</a> (e.g. <code>inspect()</code>, <code>$0</code> etc). | 370 Tools console API</a> (e.g. <code>inspect()</code>, <code>$0</code> etc). |
371 </li> | 371 </li> |
372 </ul> | 372 </ul> |
373 <p class="caution"> | 373 <p class="caution"> |
374 <strong>Important:</strong> | 374 <strong>Important:</strong> |
375 Due to the security considerations explained above, | 375 Due to the security considerations explained above, the |
376 <a href="tabs.html#method-executeScript"><code>chrome.tabs.executeScript()</code
></a> is the preferred way for an extension | 376 <a href="tabs.html#method-executeScript"><code>chrome.tabs.executeScript()</code
></a> method is the preferred way for an |
377 to access DOM data of the inspected page in cases where the access to | 377 extension to access DOM data of the inspected page in cases where the access to |
378 JavaScript state of the inspected page is not required. | 378 JavaScript state of the inspected page is not required. |
379 </p><p> | 379 </p><p> |
380 The <code>reload()</code> may be used to reload the inspected page. | 380 The <code>reload()</code> method may be used to reload the inspected page. |
381 Additionally, a user agent string may be specifcied, which will cause Chrome | 381 Additionally, the caller can specify an override for the user agent string, |
382 to use the given string in the User-Agent HTTP header while fetching the page | 382 a script that will be injected early upon page load, and an option to force |
383 and its resources, and return it to the scripts running in that page. | 383 reload of cached resources. |
384 </p><p> | 384 </p><p> |
385 Use the <code>getResources()</code> call and the <code>onResourceContent</code> | 385 Use the <code>getResources()</code> call and the <code>onResourceContent</code> |
386 event to obtain the list of resources (documents, stylesheets, scripts, images | 386 event to obtain the list of resources (documents, stylesheets, scripts, images |
387 etc) within the inspected page. The <code>getContent()</code> and <code>setConte
nt()</code> methods of the <code>Resource</code> class along with the | 387 etc) within the inspected page. The <code>getContent()</code> and <code>setConte
nt()</code> methods of the <code>Resource</code> class along with the |
388 <code>onResourceContentCommitted</code> event may be used to support | 388 <code>onResourceContentCommitted</code> event may be used to support |
389 modification of the resource content, e.g. by an external editor. | 389 modification of the resource content, e.g. by an external editor. |
390 </p> | 390 </p> |
391 | 391 |
392 <h2 id="overview-examples">Examples</h2> | 392 <h2 id="overview-examples">Examples</h2> |
393 <p>The following code checks for the version of jQuery used by the inspected | 393 <p>The following code checks for the version of jQuery used by the inspected |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 can ensure that your extension won't be run in an earlier brow
ser version. | 1039 can ensure that your extension won't be run in an earlier brow
ser version. |
1040 </p> | 1040 </p> |
1041 </div> <!-- /description --> | 1041 </div> <!-- /description --> |
1042 | 1042 |
1043 </div><div class="apiItem"> | 1043 </div><div class="apiItem"> |
1044 <a name="method-reload"></a> <!-- method-anchor --> | 1044 <a name="method-reload"></a> <!-- method-anchor --> |
1045 <h4>reload</h4> | 1045 <h4>reload</h4> |
1046 | 1046 |
1047 <div class="summary"><span style="display: none; ">void</span> | 1047 <div class="summary"><span style="display: none; ">void</span> |
1048 <!-- Note: intentionally longer 80 columns --> | 1048 <!-- Note: intentionally longer 80 columns --> |
1049 <span>chrome.experimental.devtools.inspectedWindow.reload</spa
n>(<span class="optional"><span style="display: none; ">, </span><span>string</s
pan> | 1049 <span>chrome.experimental.devtools.inspectedWindow.reload</spa
n>(<span class="optional"><span style="display: none; ">, </span><span>object</s
pan> |
1050 <var><span>userAgent</span></var></span>)</div> | 1050 <var><span>reloadOptions</span></var></span>)</div> |
1051 | 1051 |
1052 <div class="description"> | 1052 <div class="description"> |
1053 <p class="todo" style="display: none; ">Undocumented.</p> | 1053 <p class="todo" style="display: none; ">Undocumented.</p> |
1054 <p>Reloads the inspected page, optionally setting override for t
he user agent string.</p> | 1054 <p>Reloads the inspected page.</p> |
1055 | 1055 |
1056 <!-- PARAMETERS --> | 1056 <!-- PARAMETERS --> |
1057 <h4>Parameters</h4> | 1057 <h4>Parameters</h4> |
1058 <dl> | 1058 <dl> |
1059 <div> | 1059 <div> |
1060 <div> | 1060 <div> |
1061 <dt> | 1061 <dt> |
| 1062 <var>reloadOptions</var> |
| 1063 <em> |
| 1064 |
| 1065 <!-- TYPE --> |
| 1066 <div style="display:inline"> |
| 1067 ( |
| 1068 <span class="optional">optional</span> |
| 1069 <span class="enum" style="display: none; ">enumerated</span> |
| 1070 <span id="typeTemplate"> |
| 1071 <span style="display: none; "> |
| 1072 <a> Type</a> |
| 1073 </span> |
| 1074 <span> |
| 1075 <span style="display: none; "> |
| 1076 array of <span><span></span></span> |
| 1077 </span> |
| 1078 <span>object</span> |
| 1079 <span style="display: none; "></span> |
| 1080 </span> |
| 1081 </span> |
| 1082 ) |
| 1083 </div> |
| 1084 |
| 1085 </em> |
| 1086 </dt> |
| 1087 <dd class="todo"> |
| 1088 Undocumented. |
| 1089 </dd> |
| 1090 <dd style="display: none; "> |
| 1091 Description of this parameter from the json schema. |
| 1092 </dd> |
| 1093 <dd style="display: none; "> |
| 1094 This parameter was added in version |
| 1095 <b><span></span></b>. |
| 1096 You must omit this parameter in earlier versions, |
| 1097 and you may omit it in any version. If you require this |
| 1098 parameter, the manifest key |
| 1099 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 1100 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 1101 </dd> |
| 1102 |
| 1103 <!-- OBJECT PROPERTIES --> |
| 1104 <dd> |
| 1105 <dl> |
| 1106 <div> |
| 1107 <div> |
| 1108 <dt> |
| 1109 <var>ignoreCache</var> |
| 1110 <em> |
| 1111 |
| 1112 <!-- TYPE --> |
| 1113 <div style="display:inline"> |
| 1114 ( |
| 1115 <span class="optional">optional</span> |
| 1116 <span class="enum" style="display: none; ">enumerated</span> |
| 1117 <span id="typeTemplate"> |
| 1118 <span style="display: none; "> |
| 1119 <a> Type</a> |
| 1120 </span> |
| 1121 <span> |
| 1122 <span style="display: none; "> |
| 1123 array of <span><span></span></span> |
| 1124 </span> |
| 1125 <span>boolean</span> |
| 1126 <span style="display: none; "></span> |
| 1127 </span> |
| 1128 </span> |
| 1129 ) |
| 1130 </div> |
| 1131 |
| 1132 </em> |
| 1133 </dt> |
| 1134 <dd class="todo" style="display: none; "> |
| 1135 Undocumented. |
| 1136 </dd> |
| 1137 <dd>When true, the loader will ignore cache for all inspected page res
ources loaded before the <code>load</code> event is fired. The effect is similar
to pressing Ctrl+Shift+R in the inspected window or within the Developer Tools
window.</dd> |
| 1138 <dd style="display: none; "> |
| 1139 This parameter was added in version |
| 1140 <b><span></span></b>. |
| 1141 You must omit this parameter in earlier versions, |
| 1142 and you may omit it in any version. If you require this |
| 1143 parameter, the manifest key |
| 1144 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 1145 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 1146 </dd> |
| 1147 |
| 1148 <!-- OBJECT PROPERTIES --> |
| 1149 <dd style="display: none; "> |
| 1150 <dl> |
| 1151 <div> |
| 1152 <div> |
| 1153 </div> |
| 1154 </div> |
| 1155 </dl> |
| 1156 </dd> |
| 1157 |
| 1158 <!-- OBJECT METHODS --> |
| 1159 <dd style="display: none; "> |
| 1160 <div></div> |
| 1161 </dd> |
| 1162 |
| 1163 <!-- OBJECT EVENT FIELDS --> |
| 1164 <dd style="display: none; "> |
| 1165 <div></div> |
| 1166 </dd> |
| 1167 |
| 1168 <!-- FUNCTION PARAMETERS --> |
| 1169 <dd style="display: none; "> |
| 1170 <div></div> |
| 1171 </dd> |
| 1172 |
| 1173 </div> |
| 1174 </div><div> |
| 1175 <div> |
| 1176 <dt> |
1062 <var>userAgent</var> | 1177 <var>userAgent</var> |
1063 <em> | 1178 <em> |
1064 | 1179 |
1065 <!-- TYPE --> | 1180 <!-- TYPE --> |
1066 <div style="display:inline"> | 1181 <div style="display:inline"> |
1067 ( | 1182 ( |
1068 <span class="optional">optional</span> | 1183 <span class="optional">optional</span> |
1069 <span class="enum" style="display: none; ">enumerated</span> | 1184 <span class="enum" style="display: none; ">enumerated</span> |
1070 <span id="typeTemplate"> | 1185 <span id="typeTemplate"> |
1071 <span style="display: none; "> | 1186 <span style="display: none; "> |
1072 <a> Type</a> | 1187 <a> Type</a> |
1073 </span> | 1188 </span> |
1074 <span> | 1189 <span> |
1075 <span style="display: none; "> | 1190 <span style="display: none; "> |
1076 array of <span><span></span></span> | 1191 array of <span><span></span></span> |
1077 </span> | 1192 </span> |
1078 <span>string</span> | 1193 <span>string</span> |
1079 <span style="display: none; "></span> | 1194 <span style="display: none; "></span> |
1080 </span> | 1195 </span> |
1081 </span> | 1196 </span> |
1082 ) | 1197 ) |
1083 </div> | 1198 </div> |
1084 | 1199 |
1085 </em> | 1200 </em> |
1086 </dt> | 1201 </dt> |
1087 <dd class="todo" style="display: none; "> | 1202 <dd class="todo" style="display: none; "> |
1088 Undocumented. | 1203 Undocumented. |
1089 </dd> | 1204 </dd> |
1090 <dd>A user agent override string.</dd> | 1205 <dd>If specified, the string will override the value of <code>User-Age
nt</code> HTTP header sent while loading the resources of inspected page and the
value of the <code>navigator.userAgent</code> property returned to the scripts
running within the inspected page.</dd> |
1091 <dd style="display: none; "> | 1206 <dd style="display: none; "> |
1092 This parameter was added in version | 1207 This parameter was added in version |
1093 <b><span></span></b>. | 1208 <b><span></span></b>. |
| 1209 You must omit this parameter in earlier versions, |
| 1210 and you may omit it in any version. If you require this |
| 1211 parameter, the manifest key |
| 1212 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 1213 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 1214 </dd> |
| 1215 |
| 1216 <!-- OBJECT PROPERTIES --> |
| 1217 <dd style="display: none; "> |
| 1218 <dl> |
| 1219 <div> |
| 1220 <div> |
| 1221 </div> |
| 1222 </div> |
| 1223 </dl> |
| 1224 </dd> |
| 1225 |
| 1226 <!-- OBJECT METHODS --> |
| 1227 <dd style="display: none; "> |
| 1228 <div></div> |
| 1229 </dd> |
| 1230 |
| 1231 <!-- OBJECT EVENT FIELDS --> |
| 1232 <dd style="display: none; "> |
| 1233 <div></div> |
| 1234 </dd> |
| 1235 |
| 1236 <!-- FUNCTION PARAMETERS --> |
| 1237 <dd style="display: none; "> |
| 1238 <div></div> |
| 1239 </dd> |
| 1240 |
| 1241 </div> |
| 1242 </div><div> |
| 1243 <div> |
| 1244 <dt> |
| 1245 <var>injectedScript</var> |
| 1246 <em> |
| 1247 |
| 1248 <!-- TYPE --> |
| 1249 <div style="display:inline"> |
| 1250 ( |
| 1251 <span class="optional">optional</span> |
| 1252 <span class="enum" style="display: none; ">enumerated</span> |
| 1253 <span id="typeTemplate"> |
| 1254 <span style="display: none; "> |
| 1255 <a> Type</a> |
| 1256 </span> |
| 1257 <span> |
| 1258 <span style="display: none; "> |
| 1259 array of <span><span></span></span> |
| 1260 </span> |
| 1261 <span>string</span> |
| 1262 <span style="display: none; "></span> |
| 1263 </span> |
| 1264 </span> |
| 1265 ) |
| 1266 </div> |
| 1267 |
| 1268 </em> |
| 1269 </dt> |
| 1270 <dd class="todo" style="display: none; "> |
| 1271 Undocumented. |
| 1272 </dd> |
| 1273 <dd>If specified, the script will be injected into every frame of the
inspected page immediately upon load, before any of the frame's scripts. The scr
ipt will not be injected after subsequent reloads, for example, if user presses
Ctrl+R.</dd> |
| 1274 <dd style="display: none; "> |
| 1275 This parameter was added in version |
| 1276 <b><span></span></b>. |
1094 You must omit this parameter in earlier versions, | 1277 You must omit this parameter in earlier versions, |
1095 and you may omit it in any version. If you require this | 1278 and you may omit it in any version. If you require this |
1096 parameter, the manifest key | 1279 parameter, the manifest key |
1097 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | 1280 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
1098 can ensure that your extension won't be run in an earlier browser ve
rsion. | 1281 can ensure that your extension won't be run in an earlier browser ve
rsion. |
1099 </dd> | 1282 </dd> |
1100 | 1283 |
1101 <!-- OBJECT PROPERTIES --> | 1284 <!-- OBJECT PROPERTIES --> |
1102 <dd style="display: none; "> | 1285 <dd style="display: none; "> |
1103 <dl> | 1286 <dl> |
(...skipping 13 matching lines...) Expand all Loading... |
1117 <dd style="display: none; "> | 1300 <dd style="display: none; "> |
1118 <div></div> | 1301 <div></div> |
1119 </dd> | 1302 </dd> |
1120 | 1303 |
1121 <!-- FUNCTION PARAMETERS --> | 1304 <!-- FUNCTION PARAMETERS --> |
1122 <dd style="display: none; "> | 1305 <dd style="display: none; "> |
1123 <div></div> | 1306 <div></div> |
1124 </dd> | 1307 </dd> |
1125 | 1308 |
1126 </div> | 1309 </div> |
| 1310 </div> |
| 1311 </dl> |
| 1312 </dd> |
| 1313 |
| 1314 <!-- OBJECT METHODS --> |
| 1315 <dd style="display: none; "> |
| 1316 <div></div> |
| 1317 </dd> |
| 1318 |
| 1319 <!-- OBJECT EVENT FIELDS --> |
| 1320 <dd style="display: none; "> |
| 1321 <div></div> |
| 1322 </dd> |
| 1323 |
| 1324 <!-- FUNCTION PARAMETERS --> |
| 1325 <dd style="display: none; "> |
| 1326 <div></div> |
| 1327 </dd> |
| 1328 |
| 1329 </div> |
1127 </div> | 1330 </div> |
1128 </dl> | 1331 </dl> |
1129 | 1332 |
1130 <!-- RETURNS --> | 1333 <!-- RETURNS --> |
1131 <h4 style="display: none; ">Returns</h4> | 1334 <h4 style="display: none; ">Returns</h4> |
1132 <dl> | 1335 <dl> |
1133 <div style="display: none; "> | 1336 <div style="display: none; "> |
1134 <div> | 1337 <div> |
1135 </div> | 1338 </div> |
1136 </div> | 1339 </div> |
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2199 _uff=0; | 2402 _uff=0; |
2200 urchinTracker(); | 2403 urchinTracker(); |
2201 } | 2404 } |
2202 catch(e) {/* urchinTracker not available. */} | 2405 catch(e) {/* urchinTracker not available. */} |
2203 </script> | 2406 </script> |
2204 <!-- end analytics --> | 2407 <!-- end analytics --> |
2205 </div> | 2408 </div> |
2206 </div> <!-- /gc-footer --> | 2409 </div> <!-- /gc-footer --> |
2207 </div> <!-- /gc-container --> | 2410 </div> <!-- /gc-container --> |
2208 </body></html> | 2411 </body></html> |
OLD | NEW |