| 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> |
| 11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | 11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> | 12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> |
| 13 <link href="css/print.css" rel="stylesheet" type="text/css" media="print"> | 13 <link href="css/print.css" rel="stylesheet" type="text/css" media="print"> |
| 14 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla
te_compiled.js"> | 14 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla
te_compiled.js"> |
| 15 </script> | 15 </script> |
| 16 <script type="text/javascript" src="../../../../third_party/json_minify/mini
fy-sans-regexp.js"> | 16 <script type="text/javascript" src="../../../../third_party/json_minify/mini
fy-sans-regexp.js"> |
| 17 </script> | 17 </script> |
| 18 <script type="text/javascript" src="js/api_page_generator.js"></script> | 18 <script type="text/javascript" src="js/api_page_generator.js"></script> |
| 19 <script type="text/javascript" src="js/bootstrap.js"></script> | 19 <script type="text/javascript" src="js/bootstrap.js"></script> |
| 20 <script type="text/javascript" src="js/sidebar.js"></script> | 20 <script type="text/javascript" src="js/sidebar.js"></script> |
| 21 <meta name="description" content="Documentation for the chrome.experimental.we
bRequest module, which is part of the Google Chrome extension APIs."><title>exp
erimental.webRequest - Google Chrome Extensions - Google Code</title></head> | 21 <title>experimental.webRequest - Google Chrome Extensions - Google Code</title
></head> |
| 22 <body> <div id="devModeWarning" class="displayModeWarning"> | 22 <body> <div id="devModeWarning" class="displayModeWarning"> |
| 23 You are viewing extension docs in chrome via the 'file:' scheme: are you exp
ecting to see local changes when you refresh? You'll need run chrome with --allo
w-file-access-from-files. | 23 You are viewing extension docs in chrome via the 'file:' scheme: are you exp
ecting to see local changes when you refresh? You'll need run chrome with --allo
w-file-access-from-files. |
| 24 </div> | 24 </div> |
| 25 <div id="branchWarning" class="displayModeWarning"> | 25 <div id="branchWarning" class="displayModeWarning"> |
| 26 <span>WARNING: This is the <span id="branchName">BETA</span> documentation. | 26 <span>WARNING: This is the <span id="branchName">BETA</span> documentation. |
| 27 It may not work with the stable release of Chrome.</span> | 27 It may not work with the stable release of Chrome.</span> |
| 28 <select id="branchChooser"> | 28 <select id="branchChooser"> |
| 29 <option>Choose a different version... | 29 <option>Choose a different version... |
| 30 </option><option value="">Stable | 30 </option><option value="">Stable |
| 31 </option><option value="beta">Beta | 31 </option><option value="beta">Beta |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 </ul> | 181 </ul> |
| 182 </div> | 182 </div> |
| 183 <script> | 183 <script> |
| 184 initToggles(); | 184 initToggles(); |
| 185 </script> | 185 </script> |
| 186 <div class="g-unit" id="gc-pagecontent"> | 186 <div class="g-unit" id="gc-pagecontent"> |
| 187 <div id="pageTitle"> | 187 <div id="pageTitle"> |
| 188 <h1 class="page_title">experimental.webRequest</h1> | 188 <h1 class="page_title">experimental.webRequest</h1> |
| 189 </div> | 189 </div> |
| 190 <!-- TABLE OF CONTENTS --> | 190 <!-- TABLE OF CONTENTS --> |
| 191 <div id="toc"> | |
| 192 <h2>Contents</h2> | |
| 193 <ol> | |
| 194 <li> | |
| 195 <a href="#apiReference">API reference: chrome.experimental.webRe
quest</a> | |
| 196 <ol> | |
| 197 <li> | |
| 198 <a href="#global-events">Events</a> | |
| 199 <ol> | |
| 200 <li> | |
| 201 <a href="#event-onRequest">onRequest</a> | |
| 202 </li> | |
| 203 </ol> | |
| 204 </li> | |
| 205 <li> | |
| 206 <a href="#types">Types</a> | |
| 207 <ol> | |
| 208 <li> | |
| 209 <a href="#type-RequestMatcher">RequestMatcher</a> | |
| 210 <ol> | |
| 211 </ol> | |
| 212 </li><li> | |
| 213 <a href="#type-CancelRequest">CancelRequest</a> | |
| 214 <ol> | |
| 215 </ol> | |
| 216 </li><li> | |
| 217 <a href="#type-RedirectRequest">RedirectRequest</a> | |
| 218 <ol> | |
| 219 </ol> | |
| 220 </li> | |
| 221 </ol> | |
| 222 </li> | |
| 223 </ol> | |
| 224 </li> | |
| 225 </ol> | |
| 226 </div> | |
| 227 <!-- /TABLE OF CONTENTS --> | 191 <!-- /TABLE OF CONTENTS --> |
| 228 <!-- Standard content lead-in for experimental API pages --> | 192 <!-- Standard content lead-in for experimental API pages --> |
| 229 <!-- STATIC CONTENT PLACEHOLDER --> | 193 <!-- STATIC CONTENT PLACEHOLDER --> |
| 230 <div id="static"><div id="pageData-name" class="pageData">experimental.w
ebRequest</div> | 194 <div id="static"><div id="pageData-name" class="pageData">experimental.w
ebRequest</div> |
| 231 <p> | 195 <p> |
| 232 The <code>WebRequest</code> API is no longer experimental; | 196 The <code>WebRequest</code> API is no longer experimental; |
| 233 it's supported! You can read all about it at its new home: | 197 it's supported! You can read all about it at its new home: |
| 234 </p> | 198 </p> |
| 235 <blockquote> | 199 <blockquote> |
| 236 <a href="webRequest.html">chrome.webRequest</a> | 200 <a href="webRequest.html">chrome.webRequest</a> |
| 237 </blockquote> | 201 </blockquote> |
| 238 <p> | 202 <p> |
| 239 What you see below are early outcomes of the plan to implement a declarative | 203 What you see below are early outcomes of the plan to implement a declarative |
| 240 version of the WebRequest API. Please ignore this until we give notice. | 204 version of the WebRequest API. Please ignore this until we give notice. |
| 241 </p> | 205 </p> |
| 242 </div> | 206 </div> |
| 243 <!-- API PAGE --> | 207 <!-- API PAGE --> |
| 244 <div class="apiPage"> | 208 <!-- /apiPage --> |
| 245 <a name="apiReference"></a> | |
| 246 <h2>API reference: chrome.experimental.webRequest</h2> | |
| 247 <!-- PROPERTIES --> | |
| 248 <!-- /apiGroup --> | |
| 249 <!-- METHODS --> | |
| 250 <!-- /apiGroup --> | |
| 251 <!-- EVENTS --> | |
| 252 <div id="eventsTemplate" class="apiGroup"> | |
| 253 <a name="global-events"></a> | |
| 254 <h3>Events</h3> | |
| 255 <!-- iterates over all events --> | |
| 256 <div class="apiItem"> | |
| 257 <a name="event-onRequest"></a> | |
| 258 <h4>onRequest</h4> | |
| 259 <div class="summary"> | |
| 260 <!-- Note: intentionally longer 80 columns --> | |
| 261 <span class="subdued">chrome.experimental.webRequest.</span><spa
n>onRequest</span><span class="subdued">.addListener</span>(function(<span></spa
n>) <span class="subdued">{...}</span><span></span>); | |
| 262 </div> | |
| 263 <div class="description"> | |
| 264 <!-- LISTENER PARAMETERS --> | |
| 265 <!-- EXTRA PARAMETERS --> | |
| 266 <!-- LISTENER RETURN VALUE --> | |
| 267 <dl> | |
| 268 </dl> | |
| 269 </div> <!-- /description --> | |
| 270 </div> <!-- /apiItem --> | |
| 271 </div> <!-- /apiGroup --> | |
| 272 <!-- TYPES --> | |
| 273 <div class="apiGroup"> | |
| 274 <a name="types"></a> | |
| 275 <h3 id="types">Types</h3> | |
| 276 <!-- iterates over all types --> | |
| 277 <div class="apiItem"> | |
| 278 <a name="type-RequestMatcher"></a> | |
| 279 <h4>RequestMatcher</h4> | |
| 280 <div> | |
| 281 <dt> | |
| 282 <em> | |
| 283 <!-- TYPE --> | |
| 284 <div style="display:inline"> | |
| 285 ( | |
| 286 <span id="typeTemplate"> | |
| 287 <span> | |
| 288 <span>object</span> | |
| 289 </span> | |
| 290 </span> | |
| 291 ) | |
| 292 </div> | |
| 293 </em> | |
| 294 </dt> | |
| 295 <dd>Matches network events by various criteria.</dd> | |
| 296 <!-- OBJECT PROPERTIES --> | |
| 297 <dd> | |
| 298 <dl> | |
| 299 <div> | |
| 300 <div> | |
| 301 <dt> | |
| 302 <var>url</var> | |
| 303 <em> | |
| 304 <!-- TYPE --> | |
| 305 <div style="display:inline"> | |
| 306 ( | |
| 307 <span class="optional">optional</span> | |
| 308 <span id="typeTemplate"> | |
| 309 <span> | |
| 310 <a>UrlFilter</a> | |
| 311 </span> | |
| 312 </span> | |
| 313 ) | |
| 314 </div> | |
| 315 </em> | |
| 316 </dt> | |
| 317 <dd>Matches if the condition of the UrlFilter are fulfilled for the UR
L of the request.</dd> | |
| 318 <!-- OBJECT PROPERTIES --> | |
| 319 <!-- OBJECT METHODS --> | |
| 320 <!-- OBJECT EVENT FIELDS --> | |
| 321 <!-- FUNCTION PARAMETERS --> | |
| 322 </div> | |
| 323 </div><div> | |
| 324 <div> | |
| 325 <dt> | |
| 326 <var>resourceType</var> | |
| 327 <em> | |
| 328 <!-- TYPE --> | |
| 329 <div style="display:inline"> | |
| 330 ( | |
| 331 <span class="optional">optional</span> | |
| 332 <span id="typeTemplate"> | |
| 333 <span> | |
| 334 <span> | |
| 335 array of <span><span> | |
| 336 <span> | |
| 337 <span>string</span> | |
| 338 <span>["main_frame", "sub_frame", "stylesheet", "script"
, "image", "object", "xmlhttprequest", "other"]</span> | |
| 339 </span> | |
| 340 </span></span> | |
| 341 </span> | |
| 342 </span> | |
| 343 </span> | |
| 344 ) | |
| 345 </div> | |
| 346 </em> | |
| 347 </dt> | |
| 348 <dd>Matches if the request type of a request is contained in the list.
Requests that cannot match any of the types will be filtered out.</dd> | |
| 349 <!-- OBJECT PROPERTIES --> | |
| 350 <!-- OBJECT METHODS --> | |
| 351 <!-- OBJECT EVENT FIELDS --> | |
| 352 <!-- FUNCTION PARAMETERS --> | |
| 353 </div> | |
| 354 </div><div> | |
| 355 <div> | |
| 356 <dt> | |
| 357 <var>instanceType</var> | |
| 358 <em> | |
| 359 <!-- TYPE --> | |
| 360 <div style="display:inline"> | |
| 361 ( | |
| 362 <span class="enum">enumerated</span> | |
| 363 <span id="typeTemplate"> | |
| 364 <span> | |
| 365 <span>string</span> | |
| 366 <span>["experimental.webRequest.RequestMatcher"]</span> | |
| 367 </span> | |
| 368 </span> | |
| 369 ) | |
| 370 </div> | |
| 371 </em> | |
| 372 </dt> | |
| 373 <dd class="todo"> | |
| 374 Undocumented. | |
| 375 </dd> | |
| 376 <!-- OBJECT PROPERTIES --> | |
| 377 <!-- OBJECT METHODS --> | |
| 378 <!-- OBJECT EVENT FIELDS --> | |
| 379 <!-- FUNCTION PARAMETERS --> | |
| 380 </div> | |
| 381 </div> | |
| 382 </dl> | |
| 383 </dd> | |
| 384 <!-- OBJECT METHODS --> | |
| 385 <!-- OBJECT EVENT FIELDS --> | |
| 386 <!-- FUNCTION PARAMETERS --> | |
| 387 </div> | |
| 388 </div><div class="apiItem"> | |
| 389 <a name="type-CancelRequest"></a> | |
| 390 <h4>CancelRequest</h4> | |
| 391 <div> | |
| 392 <dt> | |
| 393 <em> | |
| 394 <!-- TYPE --> | |
| 395 <div style="display:inline"> | |
| 396 ( | |
| 397 <span id="typeTemplate"> | |
| 398 <span> | |
| 399 <span>object</span> | |
| 400 </span> | |
| 401 </span> | |
| 402 ) | |
| 403 </div> | |
| 404 </em> | |
| 405 </dt> | |
| 406 <dd>Declarative event action that cancels a network request.</dd> | |
| 407 <!-- OBJECT PROPERTIES --> | |
| 408 <dd> | |
| 409 <dl> | |
| 410 <div> | |
| 411 <div> | |
| 412 <dt> | |
| 413 <var>instanceType</var> | |
| 414 <em> | |
| 415 <!-- TYPE --> | |
| 416 <div style="display:inline"> | |
| 417 ( | |
| 418 <span class="enum">enumerated</span> | |
| 419 <span id="typeTemplate"> | |
| 420 <span> | |
| 421 <span>string</span> | |
| 422 <span>["experimental.webRequest.CancelRequest"]</span> | |
| 423 </span> | |
| 424 </span> | |
| 425 ) | |
| 426 </div> | |
| 427 </em> | |
| 428 </dt> | |
| 429 <dd class="todo"> | |
| 430 Undocumented. | |
| 431 </dd> | |
| 432 <!-- OBJECT PROPERTIES --> | |
| 433 <!-- OBJECT METHODS --> | |
| 434 <!-- OBJECT EVENT FIELDS --> | |
| 435 <!-- FUNCTION PARAMETERS --> | |
| 436 </div> | |
| 437 </div> | |
| 438 </dl> | |
| 439 </dd> | |
| 440 <!-- OBJECT METHODS --> | |
| 441 <!-- OBJECT EVENT FIELDS --> | |
| 442 <!-- FUNCTION PARAMETERS --> | |
| 443 </div> | |
| 444 </div><div class="apiItem"> | |
| 445 <a name="type-RedirectRequest"></a> | |
| 446 <h4>RedirectRequest</h4> | |
| 447 <div> | |
| 448 <dt> | |
| 449 <em> | |
| 450 <!-- TYPE --> | |
| 451 <div style="display:inline"> | |
| 452 ( | |
| 453 <span id="typeTemplate"> | |
| 454 <span> | |
| 455 <span>object</span> | |
| 456 </span> | |
| 457 </span> | |
| 458 ) | |
| 459 </div> | |
| 460 </em> | |
| 461 </dt> | |
| 462 <dd>Declarative event action that redirects a network request. (TODO:
add destination)</dd> | |
| 463 <!-- OBJECT PROPERTIES --> | |
| 464 <dd> | |
| 465 <dl> | |
| 466 <div> | |
| 467 <div> | |
| 468 <dt> | |
| 469 <var>instanceType</var> | |
| 470 <em> | |
| 471 <!-- TYPE --> | |
| 472 <div style="display:inline"> | |
| 473 ( | |
| 474 <span class="enum">enumerated</span> | |
| 475 <span id="typeTemplate"> | |
| 476 <span> | |
| 477 <span>string</span> | |
| 478 <span>["experimental.webRequest.RedirectRequest"]</span> | |
| 479 </span> | |
| 480 </span> | |
| 481 ) | |
| 482 </div> | |
| 483 </em> | |
| 484 </dt> | |
| 485 <dd class="todo"> | |
| 486 Undocumented. | |
| 487 </dd> | |
| 488 <!-- OBJECT PROPERTIES --> | |
| 489 <!-- OBJECT METHODS --> | |
| 490 <!-- OBJECT EVENT FIELDS --> | |
| 491 <!-- FUNCTION PARAMETERS --> | |
| 492 </div> | |
| 493 </div><div> | |
| 494 <div> | |
| 495 <dt> | |
| 496 <var>redirectUrl</var> | |
| 497 <em> | |
| 498 <!-- TYPE --> | |
| 499 <div style="display:inline"> | |
| 500 ( | |
| 501 <span id="typeTemplate"> | |
| 502 <span> | |
| 503 <span>string</span> | |
| 504 </span> | |
| 505 </span> | |
| 506 ) | |
| 507 </div> | |
| 508 </em> | |
| 509 </dt> | |
| 510 <dd>Destination to where the request is redirected.</dd> | |
| 511 <!-- OBJECT PROPERTIES --> | |
| 512 <!-- OBJECT METHODS --> | |
| 513 <!-- OBJECT EVENT FIELDS --> | |
| 514 <!-- FUNCTION PARAMETERS --> | |
| 515 </div> | |
| 516 </div> | |
| 517 </dl> | |
| 518 </dd> | |
| 519 <!-- OBJECT METHODS --> | |
| 520 <!-- OBJECT EVENT FIELDS --> | |
| 521 <!-- FUNCTION PARAMETERS --> | |
| 522 </div> | |
| 523 </div> <!-- /apiItem --> | |
| 524 </div> <!-- /apiGroup --> | |
| 525 </div> <!-- /apiPage --> | |
| 526 </div> <!-- /gc-pagecontent --> | 209 </div> <!-- /gc-pagecontent --> |
| 527 </div> <!-- /g-section --> | 210 </div> <!-- /g-section --> |
| 528 </div> <!-- /codesiteContent --> | 211 </div> <!-- /codesiteContent --> |
| 529 <div id="gc-footer" --=""> | 212 <div id="gc-footer" --=""> |
| 530 <div class="text"> | 213 <div class="text"> |
| 531 <p> | 214 <p> |
| 532 Except as otherwise <a href="http://code.google.com/policies.html#restrictions
">noted</a>, | 215 Except as otherwise <a href="http://code.google.com/policies.html#restrictions
">noted</a>, |
| 533 the content of this page is licensed under the <a rel="license" href="http://c
reativecommons.org/licenses/by/3.0/">Creative Commons | 216 the content of this page is licensed under the <a rel="license" href="http://c
reativecommons.org/licenses/by/3.0/">Creative Commons |
| 534 Attribution 3.0 License</a>, and code samples are licensed under the | 217 Attribution 3.0 License</a>, and code samples are licensed under the |
| 535 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic
ense</a>. | 218 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic
ense</a>. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 553 _uff=0; | 236 _uff=0; |
| 554 urchinTracker(); | 237 urchinTracker(); |
| 555 } | 238 } |
| 556 catch(e) {/* urchinTracker not available. */} | 239 catch(e) {/* urchinTracker not available. */} |
| 557 </script> | 240 </script> |
| 558 <!-- end analytics --> | 241 <!-- end analytics --> |
| 559 </div> | 242 </div> |
| 560 </div> <!-- /gc-footer --> | 243 </div> <!-- /gc-footer --> |
| 561 </div> <!-- /gc-container --> | 244 </div> <!-- /gc-container --> |
| 562 </body></html> | 245 </body></html> |
| OLD | NEW |